: open(BW,$bw) || die &dead("Can't find Bad word list", $!);
: @indata = <BW>; 
: close(BW); 
: 
: $tmp = join ("|", @indata);

I think you need to chomp the lines you read from $bw.  Otherwise
they'll still have newlines in them. (hint: print out $tmp to see what
the regex will look like.)

Try this:

open(BW,$bw) || die &dead("Can't find Bad word list", $!);
chomp(@indata = <BW>);
close(BW);

--
Tim Kimball · ACDSD / MAST        ¦ 
Space Telescope Science Institute ¦ We are here on Earth to do good to others.
3700 San Martin Drive             ¦ What the others are here for, I don't know.
Baltimore MD 21218 USA            ¦                           -- W.H. Auden

Reply via email to