in reply to Sort Array
By default sort uses the cmp operator to compare elements,
which does a string comparison. In ASCII order, "10" comes
before "8", which is why you are getting those results. As
wog pointed out, you have to instruct the <=> operator
to make it compare things as numbers.
--ZZamboni
|
---|
In Section
Seekers of Perl Wisdom