in reply to ignore certain files in a folder search, and create a random .txt file
# skip a file in the loop in this case .gif files next if $File =~/\.gif$/; # write to a file (append mode) my $file = "C:\\temp\\warning.txt"; open OUT, ">>$file" or die "Can't append $file, perl say reason $!\n"; # print to file print OUT "$File older than 5min found\n"; # warn prints to STDERR ie screen on win32 warn "$File older than 5min found\n"; close OUT;
cheers
tachyon
|
|---|