DB<106> safe_reverse \%h => (1, ["a", "b"], 2, "c")
That kind of hash (reference) drives me nuts as it makes using the values cumbersome due to the need to test the type before use. (That reminds me to write a utility sub to convert (plain) scalar to one-element array reference.)
In reply to Re^3: inverting hash / grouping values
by Anonymous Monk
in thread inverting hash / grouping values
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |