in reply to number of keys and values in a hash
I think many here are confused because you split your script into two halves.
Instead of
my %nums =( "$number", $info);
which initializes (i.e. removes previous information in) a hash, you should use
$nums{$number}= $info;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: number of keys and values in a hash
by veerubiji (Sexton) on Oct 12, 2011 at 10:04 UTC | |
by pvaldes (Chaplain) on Oct 12, 2011 at 10:58 UTC | |
by jethro (Monsignor) on Oct 12, 2011 at 19:59 UTC | |
by veerubiji (Sexton) on Oct 13, 2011 at 09:13 UTC |
In Section
Seekers of Perl Wisdom