in reply to How to process named parameters that have the same key name?
This prints out the expected:my %foo = ( animal => 'monkey', fish => 'tuna', insect => 'ant', insect => 'spider' ); while (my ($key, $value) = each %foo) { print "KEY: $key\n VALUE: $value\n"; }
Note that there is no ant in there. So I'm missing something obvious, or you'll be stomping on a value.KEY: insect VALUE: spider KEY: animal VALUE: monkey KEY: fish VALUE: tuna
|
|---|