Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: fast, flexible, stable sort

by bart (Canon)
on Feb 12, 2004 at 20:46 UTC ( #328658=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Data::Dumper;
    $Data::Dumper::Useqq = 1;
    my @data = map "\0" x $_, 0 .. 5;
    print Dumper [ sort @data ],
      [ sort map pack("a*N", $data[$_], $_), 0 .. $#data ];
    
  2. or download this
    $VAR1 = [
              "",
    ...
              "\0\0\0\0\0\2",
              "\0\0\0\0\1"
            ];
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2015-07-31 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (278 votes), past polls