Wouldn't this be better?

my $year = "";
my $month = "";
my $day = "";

if($file =~ /^(\d{4})(\d{2})(\d{2})-www.tar.gz$/) {
  $year = $1;
  $month = $2;
  $day = $3;

my $chk = "$month - 1";

foreach($file ! $chk) {
  $ftp->delete($file); }

??? Not sure but I am going to test it out....

Wc -Sx- Jones wrote:
Jas wrote:

if($file =~ /^(\d{8})-www\.tar\.gz$/) {



I believe you might like this better -


...

if ($file =~ /^\d{4}.*-www\.t(?:ar.)gz$/i) {
...

-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