DOH!  I knew that, honest; it literally was just
a brain freeze.

With the chomp, it works perfectly.  I'll send this
back through to Matt Wright, and maybe he'll update
the program; I know his is one of the most popular
of the Guestbooks out there.

Bill Ward

> -----Original Message-----
> From: Andrew Pasquale [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 9:45 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [OT] Guestbook spamming
> 
> 
> On Mon, Dec 02, 2002 at 02:29:25PM -0500 or thereabouts, Ward 
> William E DLDN wrote:
> > As a followup, I've been writing a section for the
> > Guestbook script to check for curse words... but it
> > doesn't work.
 
> > Can someone please check my perl?
 
> You need to remove the end of line characters. 
> > ---- Begin Code -----
> > # Check that the comments do NOT contain "curse" words
> > open (FILE,"$cursewordlist") || die "Can't Open 
> $cursewordlist: $!\n";
> > @cursewords=<FILE>;
> > close(FILE);
> > foreach $x (@cursewords)
> > {
> 
>           chomp($x);         #                  <<<< Remove EOL
> 
> >         if ($FORM{'comments'} =~ /$x/i)
> >         {
> >                 &no_comments;
> >         }
> > }
> > ----- End Code ------
> > <snip>
> regards
> Andrew Pasquale



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to