while ($something =~ m/($list)/ig) { print "Found '$1' in '$something'\n"; }