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..."; if (-1 != index $str, $match) { print "..do something..\n"; }