if ($f =~/$searchstring/i) { print "\nfound $f\n" } else { print "\nnot found\n" }