reds has asked for the wisdom of the Perl Monks concerning the following question:
my @temp_filelist; my $temppath = $TEMP_PATH; $temppath =~ s/\\/\\\\/g; find(\&wanted, $TEMP_PATH); # this is called for each file in $TEMP_PATH sub wanted { my $path = $File::Find::dir; $path =~ s|^$temppath||o; $path =~ s|[\\/]|$dc|g; $path =~ s|^[\\/]||; push @temp_filelist, "$path${dc}$_"; } my $tar = Archive::Tar->new(); foreach (@temp_filelist) { #print "$_\n"; $tar->add_files("$_"); } #$tar->add_files(@temp_filelist); $tar->write("$OUTPUT_FILE.gz",1); @temp_filelist = $tar->list_files();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: An "it-must-have-a-simple-answer" Archive::Tar question.
by reds (Novice) on Apr 29, 2003 at 21:24 UTC | |
by reds (Novice) on Apr 29, 2003 at 21:41 UTC | |
by reds (Novice) on Apr 29, 2003 at 21:57 UTC | |
by crenz (Priest) on Apr 29, 2003 at 23:15 UTC |