I've been coding in Perl for years, but have gotten out of practice lately :-( I'm hoping a second set of eyes can help me find my error.
This is what I have:
$comment = 'this is the w.o.r.d<br>OK';
$stripped = $comment =~ s#<.+?>##sg;
$workaround = $stripped =~ s#[^\w]##sg;
$return = $workaround =~ /word/i ? 1 : 2;
I thought this would work but it's returning "2" when I'm expecting "1".
Can you guys see where I'm messing up? TIA!