Others said why chomp doesn't do what you want.
Here is a workaround that should do what you expect in Windows and Unix:
#!/usr/bin/perl -w use strict; my @words; open FH, "banned.txt" or die "can't open\n"; { local $/; my $bannedwords = <FH>; close FH; eval "\@words = qw($bannedwords)"; }
HTH
In reply to Re: Why chomp doesn't work?
by rnahi
in thread Why chomp doesn't work?
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |