I'm pretty sure I spotted this snippet somewhere but now I can't recall where or how this is done.
Is there a more elegant way to obtain a key ordered list or array hash values.
In other words,
A) Order the hash based on keys
B) return a list of the values based on their key order.
#unrelated code here my @data; for (sort keys %ABC) { push(@data, $ABC{$_}); } return @data;
Any ideas on this?
In reply to Return values from a key sorted hash by SavannahLion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |