Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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/'; my $file2 = '/root/Desktop/'; 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?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2016-02-09 19:25 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (323 votes), past polls