|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re: $a <=> $bby GrandFather (Cardinal) |
| on Oct 10, 2012 at 01:31 UTC ( #998106=note: print w/ replies, xml ) | Need Help?? |
|
roboticus answered the immediate question, but note that this is why you should avoid using $a and $b a general purpose variables: they are magical and should really only be used inside sort. Note too that using sort without a {...} bit is like sort {$a cmp $b}. That is, sort's default is to do a string sort.
True laziness is hard work
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||