sata
asked on
Puzzle in sort
Hi,
I am not familiar with perl, and has came across this line for a sort
foreach $key (sort {$info{$b} <=> $info{$a}}keys(%info))
{
I was told that this is used to sort a hash list by using other fields that the key, how is it so?
Thanks in Advance.
I am not familiar with perl, and has came across this line for a sort
foreach $key (sort {$info{$b} <=> $info{$a}}keys(%info))
{
I was told that this is used to sort a hash list by using other fields that the key, how is it so?
Thanks in Advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the answer!!
perldoc -q sort