in reply to Re^2: tar help
in thread tar help

my @files; tie %dir, 'IO::Dir', "/var/lib/mysql/club"; foreach (keys %dir) { next if $_ eq "."; next if $_ eq ".."; push( @files, "/var/lib/mysql/club/" . $_ ); } my $tar = Archive::Tar->new; $tar->add_files( @files ); $tar->write('club_db.tar');

but .... don't forget to check for errors

-derby

Replies are listed 'Best First'.
Re^4: tar help
by snyder (Initiate) on Mar 23, 2006 at 17:56 UTC
    thanks, it is throwing an error but I am going to monkey with it. in an effort to understand the code piece by piece did you create an empty list/variable with the below
    my @files;