use File::Find; #Opens file to write to die("Cannot open Log file to read from.") unless(open(FILE, ">/cdw/home_dir/s006258/list.txt")); find (\&change_sas,"/cdw/home_dir"); sub change_sas { my $filename=$_; if (-d $filename) { print FILE "In DIR $filename\n"; } if (-f $filename && $filename=~/sam_norep/) { print FILE "Found $filename\n"; } } close(FILE);
In reply to Using File:Find by Fuism
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |