No such thing as a small change | |
PerlMonks |
Re^7: Creating a whitelistby haukex (Archbishop) |
on Jun 17, 2016 at 16:18 UTC ( [id://1165992]=note: print w/replies, xml ) | Need Help?? |
Hi htmanning, Sounds like the list in the DB is separated by CRLF (Windows style) instead of just LF (*NIX style). Two other ways you could fix it are by writing your split as split /\r?\n/, $goodorg; (handles CRLF and LF), and/or by trimming whitespace off each string via $goodorg=~s/^\s+|\s+$//g;. I find the fastest way to see problems like this is by using Data::Dumper with its Useqq option:
Hope this helps,
In Section
Seekers of Perl Wisdom
|
|