Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: problem with Archive::Zip

by Khen1950fx (Canon)
on Aug 10, 2010 at 10:47 UTC ( #853999=note: print w/ replies, xml ) Need Help??


in reply to problem with Archive::Zip

I fixed a few mistakes. Here's what I came up with. Compare it to your script, and you'll see the mistakes.

!/usr/bin/perl use strict; use warnings; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); my $file1 = '/root/Desktop/abc.pl'; my $file2 = '/root/Desktop/dodah.zip'; my $zip = Archive::Zip->new(); my $file_member = $zip->addFile($file1, 'copy_log'); $file_member->desiredCompressionMethod( COMPRESSION_STORED ); unless ( $zip->writeToFileNamed($file2) == AZ_OK ) { die 'write error'; }


Comment on Re: problem with Archive::Zip
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://853999]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-04-18 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (462 votes), past polls