In Cyberspace -- Jas wrote:


my @files;
   find(sub { push @files,$File::Find::name },"/path/to/www/");
   Archive::Tar->create_archive("www.tar",0,@files);

Never hard-code your paths... Eases maintenance later...

# Create Archive from recently created tarball
my $gz = system('gzip -9 www.tar');
   $gz = system('mv -f www.tar.gz ' . $date . '-www.tar.gz');

Always fully qualify your program paths... Prevents userID based security attacks...


# Create empty variables
my $year = "";
my $month = "";
my $day = "";
my $c_year = "";
my $c_month = "";
my $c_day = "";


Less wordy...

my ( $year,
     $month,
     $day,
     $c_year,
     $c_month,
     $c_day ) = '';


-Bill- :) __Sx__________________________________________ http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to