Hi,
I have an array of hashes and need to sort them, I have the following code...
Which is fine, but I also want to include within company order, individual name order, as there are mutiple company names for the same company as there are multiple staff.
How would I sort by 'CompanyName' AND 'Surname' ?
Thanks,
1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Google Rank Extractor -> Perl beta with FusionCharts
I have an array of hashes and need to sort them, I have the following code...
Code:
# sort
my @sorted = sort { $b->{'CompanyName'} <=> $a->{'CompanyName'} } @recs;
Which is fine, but I also want to include within company order, individual name order, as there are mutiple company names for the same company as there are multiple staff.
How would I sort by 'CompanyName' AND 'Surname' ?
Thanks,
1DMF
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Google Rank Extractor -> Perl beta with FusionCharts