use strict; my $something = 'This is a bang of a bing thing'; if($something =~ m/((?:bing|bong|bang))/i) { print "Found '$1' in '$something'\n"; }