Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Stable sorting in Perl (old)

by tye (Sage)
on Aug 27, 2003 at 19:24 UTC ( [id://287141]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Replace:
        my @sorted= sort @list;
    ...
                $list[$a] cmp $list[$b] || $a <=> $b
            } 0..$#list
        ];
    
  2. or download this
    # Replace:
        my @sorted=
    ...
                } 0..$#sortOn;
            ];
        };
    
  3. or download this
    # Replace:
        my @sorted=
    ...
            @list;
    
    # with:
    
  4. or download this
        my @sorted= @list[
            map { unpack "N", substr($_,-4) }
    ...
            map { XFORM($list[$_]) . pack "N", $_ }
            0..$#list
        ];
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://287141]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-24 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found