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> > Bill Ward regards -- Andrew Pasquale -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list