Rajeshk has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I faced a problem like 'Unexpected end of archive' when i open a Zipped file 'Test.zip'.
If i comment the line
#local $\ = "\n";
I get a perfect Result. If anyone can help me.
#Updated Script local $\ = "\n"; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); print "File Archive Started"; my $zip = Archive::Zip->new(); $member = $zip->addFile( 'Test.txt'); die 'write error' unless $zip->writeToFileNamed( 'Test.zip' ) == AZ_OK +; print "File Archive Competed";
Thanks,
Rajesh.K
Edited by planetscape - formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem in Archive::Zip
by BUU (Prior) on Nov 04, 2005 at 04:56 UTC | |
|
Re: Problem in Archive::Zip
by virtualsue (Vicar) on Nov 04, 2005 at 05:37 UTC | |
|
Re: Problem in Archive::Zip
by l.frankline (Hermit) on Nov 04, 2005 at 05:26 UTC | |
|
Re: Problem in Archive::Zip
by Rajeshk (Scribe) on Nov 04, 2005 at 10:25 UTC |