use strict; my $text='Try to find the hidden string here!'; if ($text=~m/\bhidden\b/) { print "We found the hidden string!\n"; } else { print "No match, sorry.\n"; }