in reply to Reading at File Level in Directories

You're using File::Find, which is written exactly to recurse through all subdirectories.

Replace the find(\&zip_file, $dir); line with something like:

foreach my $file (glob("$dir/*.log")) { $zipped = $zip->addFile( $file ); }

Replies are listed 'Best First'.
Re^2: Reading at File Level in Directories
by Anonymous Monk on Jun 07, 2006 at 15:49 UTC
    It was a very good idea, it worked! Thanks!!!
Re^2: Reading at File Level in Directories
by Anonymous Monk on Jun 07, 2006 at 15:50 UTC
    It was a very good idea, it worked!
    Thanks!!!
    #find(\&zip_file, $dir); foreach my $file (glob("$dir/*.log")) { $zipped = $zip->addFile( $file ); } die 'write error' unless $zip->writeToFileNamed( $zip_file ) == AZ_OK; #End archiving