Are you doing the sort on numeric data or strings? If so, you need to use '==' instead of 'eq', '!=' instead of 'ne', and '<' insetad of 'lt'. Or was that just part of the psedocode style?
Also, your comments seem to indicate you're showing how to do a sort in Perl for academic reasons. If not, you should just use sort instead.
----
Invent a rounder wheel.
In reply to Re: Tedious array sort revisited
by hardburn
in thread Tedious array sort revisited
by gatornek
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |