find /cdw/home_dir/ -name "*.sas" | xargs perl yourprog.pl #### 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/); } }