0 is returned if $a and $b are equal.
1 is returned if $a is greater than $b.
-1 is returned if $a is less than $b.
BrowserUk wrote A brief tutorial on Perl's native sorting facilities. It'll help.
In reply to Re: how sort works
by Khen1950fx
in thread how sort works
by Complex13
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |