Melly has asked for the wisdom of the Perl Monks concerning the following question:
Tom Melly, tom@tomandlu.co.uk#!/usr/local/bin/perl use Archive::Tar; # handles tar files my $lab_tar = Archive::Tar->new(); my $this_file = $ARGV[0]; my $tar_file = "foo.tar"; if(-e $tar_file){ print "found archive\n"; $lab_tar->read($tar_file); print $lab_tar->list_files(); print "\n"; } $lab_tar->add_files($this_file); print $lab_tar->list_files(); print "\n"; $lab_tar->write($tar_file); $lab_tar->remove($lab_tar->list_files()); #unlink $this_file;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tar help
by fs (Monk) on May 31, 2001 at 18:26 UTC | |
by Melly (Chaplain) on Jun 01, 2001 at 14:29 UTC |