opendir(DIR, $some_dir) || die "can't opendir '$some_dir': $!";
while ($file = readdir(
)) {
if ($file =~ /Somthing/){
my $fullpath = "$some_dir/$file";
open(FILE, $fullpath) or die "can't open file '$fullpath' for reading: $!";
while(<>) {
if( m/PASS/ ) {
print $_;
}
}
# look around ... I'm sure you can find examples
# of reading files line by line
close(FILE);
}
close(DIR);