if ($string =~ /doesn't/ or $string =~ /don't/) { do_something(); } else { something_else(); }