Re: Grep question

[email protected] (Rob Dixon)
Newsgroups perl.beginners
Message-ID <[email protected]>
David Gilden wrote:
> 
> my $Comments = param('(Comments');
> &BADemail if ($Comments =~ /[virtualthirst.com|napavalleycf.org]/ig);
> 
> This should go to  &BADemail if $Comments contains either string, regardless 
> else is contained in the $Comments.

The answer to your question is

  BADemail() if ($Comments =~ /virtualthirst\.com|napavalleycf\.org/;

But if you are trying to defeat a spam problem then I think you'll find it's a
little harder than that.

Let us know if we can help further.

Rob
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.