in reply to Re: Messing with hashes
in thread Messing with hashes

I always get the willies when I see someone reading from a file into an explicit $line variable. (Also, that scalar is superfluous, of course.)

Here's another way, using map:

my %file = map { chomp; split /\|/ } <STATS>;

jdporter
The 6th Rule of Perl Club is -- There is no Rule #6.