use strict; use warnings; my $match = "Tick F***ing Tock"; my $str = "Friday night at 11:30pm the start of a new series, 'Tick F***ing Tock' explores..."; $match = quotemeta $match; if ($str =~ $match) { print "..do something..\n"; }