Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I am running my perl in Solaris.I could able to make zip file successfully using Archive::Zip.
But the problem is I am not able to unzip it using command unzip . I am getting the below error
"CheckDir error : Cannnot create unable to process /root/raja/plpgm/a.txt
But I moved the same zip file to Windows OS and it unzipped successfully.
Please help me..
Below is my code .
#!/usr/bin/perl use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); my $zip = Archive::Zip->new(); $EMPFILE = "/root/raja/plpgm/a.txt"; $zip->addFile( $EMPFILE ) or warn "Error adding file $memberName\n"; if ($zip->writeToFileNamed('/root/raja/dummy.zip') != AZ_OK) { # writ +e to disk print "Error in archive creation!"; } else { print "Archive created successfully!"; }
Thanks
Suriya
20071014 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PERL : unzip issue
by graff (Chancellor) on Oct 13, 2007 at 04:19 UTC | |
by narainhere (Monk) on Oct 13, 2007 at 06:37 UTC | |
by Anonymous Monk on Apr 17, 2008 at 11:43 UTC |