in reply to
Populate Hash
It's because you use the hash
%myHash
as a global the very first time it's mentioned. You need to declare it as a local variable with:
my %myHash = ();
[download]
Also, you declare it as a hash but then use it as a scalar:
$myHash->{$n}=$v;
uses the
$myHash
scalar variable, not the
%myHash
hash variable.
Comment on
Re: Populate Hash
Select
or
Download
Code
In Section
Seekers of Perl Wisdom