You need to bring the Archive::Tar constructor out of the loop and after adding to the archive, you need to write the archive.
Doh! no need for a loop at all
my $tar = Archive::Tar->new; $tar->add_files( @files ); $tar->write( "foo.tar" );
In reply to Re: archive using tar
by derby
in thread archive using tar
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |