# Get all export and log files and command file to tar it. local *push_files = sub { push(@all_files,$File::Find::name); LOG_MESSAGE ("### ARCHIVING $File::Find::name\n"); }; # nested sub needed as use warnings complains if not # this from module file::find find(\&push_files, ($par_COMMAND_TXT,$par_EXPORTTOOL_OUTPATH,$par_EXPORTTOOL_LOG)); #### my $tar = Archive::Tar->new(); $tar->add_files(@all_files) or die LOG_MESSAGE("!!! Can't run program: $!\n"); # This is needed for older Perl version => otherwise "COMPRESS_GZIP" Bareword warning no strict; $tar->write( "$ARCHIVE_FILE", COMPRESS_GZIP) or die LOG_MESSAGE("Can't run program: $!\n"); LOG_MESSAGE ("### Archiving finished");