in reply to Re: bareword error
in thread bareword error

and since the i modifier is being used,
if ($FORM {'comments'}  =~ m/http|html|HTML|A HREF|a href/i )
can be written as
if ($FORM {'comments'}  =~ m/http|html|a href/i )

Note to self: Put two spaces between a and href when using batmanor's form.

Replies are listed 'Best First'.
Re^3: bareword error
by Bloodrage (Monk) on Mar 14, 2008 at 04:15 UTC
    Even further refined:
    if ($FORM {'comments'} =~ m/http|html|a\s+href/i )
    ..as any number of, but more than one, whitespace characters are valid between a and href.

      Now what about <a id="foo" href="...">...

      I would have mentioned \s+ if that's all that was needed.