Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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'; }

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-10-27 20:04 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (370 votes). Check out past polls.