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;
In Section
Seekers of Perl Wisdom