in reply to File check w/no files
Why are you bothering with the regex in the first place? Each $file in @files must already begin with "cold" because that's what you've globbed for. So in your code, the regex pattern always matches and the system() command will never run.
You might mean something like this instead:
Unless I'm misunderstanding your intent, which is perfectly possible...chdir 'D:\COLD\DULS' or die "Can't chdir: $!"; my @files = glob ('cold*'); if (scalar @files) { foreach my $file (@files) { print CBDOWNLOAD "Cold Backup file exists for DULS for $FileName.\ +n" ... } } else { system ('awtrap -h RLGH -f DULS "DULSVASG001: Unable to download th +e file."'); }
buckaduck
|
|---|