in reply to Searching Sub Dir for Files

If you're on a *NIX system (and it looks like you are), I like using the find program to do the heavy lifting of locating all the files for you. It's pretty powerful and will handle additional complexity if your requirements ever expand beyond "files that end in .sas". You then feed the output of find to your Perl program, letting it concentrate on the actual searching.
find /cdw/home_dir/ -name "*.sas" | xargs perl yourprog.pl
... where yourprog.pl looks something like:
use strict; use warnings; my @words = qw(foo bar baz etc.); while (<>){ for my $word (@words){ print "Found $word in $ARGV\n" if (/\Q$word/); } }

Replies are listed 'Best First'.
Re^2: Searching Sub Dir for Files
by Fuism (Beadle) on Jun 01, 2005 at 19:34 UTC
    Nice... I will try this... I will give u and everyone who helped out on this thread votes... Thanks all for all ur help... Fue