my @files = <*.HTM>; foreach $file (@files) { if ($file =~ m/IDX/gi){print $file."\n";} }