in reply to Re: Looping through a hash where some keys are the same
in thread Looping through a hash where some keys are the same

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".

Replies are listed 'Best First'.
Re^3: Looping through a hash where some keys are the same
by qq (Hermit) on Feb 18, 2005 at 11:10 UTC

    I new I was overlooking something obvious - thanks.