Hi,I have a perl script which i used to unzip a file.I have a zip file kept on a different machine on same network.When i run my script as .pl file from command prompt it successfully unzips the file on remote machine but when i run the same script as a .ipl file from Teamsite it gives an error.Can you tell some possible solution?thanks in advance
Hi,I am using TeamSite 6.5.0 Service Pack 2.OS is Windows Server 2003.I am executing my code from a ipl file which is called when user triggers a button from TS.MY CODE$targetPath="//chdsez102291d/staging/nav2/0/json.zip";$destinationPath="//chdsez102291d/staging/nav2/0";my $zip = Archive::Zip->new($targetPath);foreach my $member ($zip->members){ next if $member->isDirectory; (my $extractName = $member->fileName) =~ s{.*/}{} ; $member->extractToFileNamed("$destinationPath/$extractName") ;} I am getting following error..Can't call method "members" on an undefined value.Its giving error for this line of code :foreach my $member ($zip->members)I would like to add that when i am running this script from a separate .pl file from command prompt its running perfect.
use Archive::Zip;
...my $zip = Archive::Zip->new($targetPath);if (!defined($zip)) { die "Failed to read '$targetPath' ($!)";}...
Hi, I tried executing the code you provided and got followinmg error message :"Failed to read '//chdsez102291d/staging/nav2/0/json.zip' (No such file or directory)"Some information:I am using Archive::Zip.I have ActivePerl 5.8.7 Build 813 installed on my system.
hi ,You are rite i have tried the latter approach ie from command prompt i m using ActivePerl and from TS i m using iwperl.I tried upgrading the ARCGIVE ZIP module but got following errors."C:\perlfiles\Archive-Zip-1.20>iwperl Makefile.plHave \iw-home\iw-perl\lib\Config.pm expected C:\PROGRA~1\INTERW~1\TeamSite\iw-perl\lib\Config.pmYour perl and your Config.pm seem to have different ideas about thearchitecture they are running on.Perl thinks: [lib]Config says: [MSWin32-x86-multi]This may or may not cause problems. Please check your installation of perlif you have problems building this extension.Writing Makefile for Archive::ZipC:\perlfiles\Archive-Zip-1.20>make install'make' is not recognized as an internal or external command,operable program or batch file."
... BEGIN { push(@INC, "explicit-path-to-iwhome/iwperl/vendor/lib");};...