Hello,
I was wondering if anyone could help me sort a hash by values.
Essentially my structure is this:
I'd like to sort the entire hash to print in order of company value (alphabetically). Anyone help?
I was wondering if anyone could help me sort a hash by values.
Essentially my structure is this:
Code:
$hash = { id1 => { 'company' = value,
'units' = value,
'url' = value, },
id2 => { 'company' = value,
'units' = value,
'url' = value, } };
I'd like to sort the entire hash to print in order of company value (alphabetically). Anyone help?