Wc -Sx- Jones wrote:


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...
Can you show me an example of how to do this?


# 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...
Can you show me an example of how to do this as well?



# 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 ) = '';

Awesome, I will use this on future scripts.


-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