in reply to Re: Blocking based on words in a list
in thread Blocking based on words in a list
$FORM{'comments'} =~ /\b$_\b/ }
That may give errors or unexpected behaviour if there are metachars for REs in @blocked (e.g. opening parantheses, dots, ...). Either use quotemeta for each $_, or \Q$_\E, e.g.
@blocks = map { quotemeta($_) } @blocks; ... $FORM{'comments'} =~ /\b$_\b/
$FORM{'comments'} =~ /\b\Q$_\E\b/
Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"
|
|---|