|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Re: compare array with fileby Anonymous Monk |
| on Apr 24, 2012 at 12:20 UTC ( #966814=note: print w/ replies, xml ) | Need Help?? |
|
You forgot to remove trailing whitespace (newlines) chomp or @a = map { my $l = length $_; unpack "A$l", $_; } <FILE>;
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||