Fuism has asked for the wisdom of the Perl Monks concerning the following question:
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);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using File:Find
by GrandFather (Saint) on Nov 28, 2005 at 22:38 UTC | |
by Fuism (Beadle) on Nov 28, 2005 at 22:39 UTC | |
|
Re: Using File:Find
by ambrus (Abbot) on Nov 28, 2005 at 22:39 UTC | |
|
Re: Using File:Find
by marto (Cardinal) on Nov 28, 2005 at 22:42 UTC |