in reply to $a <=> $b
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