in reply to Object to Map Multiple Values to a Single Key

Interesting... I think it might be clearer to just use the HoA directly, but that's another "TMTOWTDI"...

I'm fairly certain you don't need the "unless (exists..." in put. Using "push @{$self->{$key}},$value" will auto-vivify $self->{$key} as an array ref if necessary.
--
Mike

  • Comment on Re: Object to Map Multiple Values to a Single Key