in reply to Re: Why chomp doesn't work?
in thread Why chomp doesn't work?

Just use
@words = split ' ', $bannedwords;
instead. Much safer.