Welcome to the Monastery | |
PerlMonks |
Re^2: Looping through a hash where some keys are the sameby lidden (Curate) |
on Feb 18, 2005 at 10:42 UTC ( [id://432263]=note: print w/replies, xml ) | Need Help?? |
each is returning a two element list, hence it is looping two times and $k, $v is only set once. It works as expected with a while. See "perldoc -f each".
In Section
Seekers of Perl Wisdom
|
|