if ($foo =~ /ar/) { print "Got $&!\n"; } $foo =~ /az/ and print "Got $&!\n";