in reply to sorting hashes by value
the second one is the default.@a = (2, 10, 1); sort {$a <=> $b} @a would give you (1, 2, 10), when sort {$a cmp $b} @a will give you (1, 10, 2)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: sorting hashes by value
by pg (Canon) on Nov 10, 2002 at 01:35 UTC |