in reply to archive using tar
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" );
|
|---|