in reply to sorting technique

Yes, $a and $b are special, as mentioned. Think about it, suppose sort would not use special variables, and you could pick any variable you wanted. How would sort than distinguish between:
sort {$a <=> $b}
and
sort {$b <=> $a}
Or what if you have something like:
sort {$a < $c ? $b <=> $d : $a <=> $e}
then what?

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.