foreach () { if ($line =~ /$_/) { print $_; } }