in reply to Hash dereferencing in a loop
In your first version $hashRef{$key}, you make use of %hashRef which is not declared. Change it to $hashRef->{$key} and you should be fine. No need to do a copy as in your workaround which would be wasteful if the hash is large.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Hash dereferencing in a loop
by sundialsvc4 (Abbot) on Jun 08, 2013 at 14:21 UTC |
In Section
Seekers of Perl Wisdom