Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/opt/ActivePerl-5.6/bin/perl # Archive::Zip is available for ActiveState perl use strict; use warnings; use Archive::Zip qw ( :ERROR_CODES :CONSTANTS ); my $zip = Archive::Zip->new(); my @files = glob("*.txt"); foreach (@files) { my $member = $zip->addFile($_); die "Cannot add $_ to zip!" unless $member; } ################################## ### RIGHT HERE, the addTree ###### ################################## $zip->addTree("dir1"); $zip->writeToFileNamed( "zipfile.zip" );
Edit: g0n - code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: $zip->addTree(...) isn't found.
by halley (Prior) on Jun 21, 2007 at 16:44 UTC | |
by heigold1 (Acolyte) on Jun 21, 2007 at 17:54 UTC | |
by Anonymous Monk on Jun 22, 2007 at 04:23 UTC | |
|
Re: $zip->addTree(...) isn't found.
by syphilis (Archbishop) on Jun 21, 2007 at 16:43 UTC |