Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Sorting question

by ikegami (Patriarch)
on May 14, 2006 at 17:09 UTC ( [id://549340]=note: print w/replies, xml ) Need Help??


in reply to Re: Sorting question
in thread Sorting question

Your code doesn't work because you forgot return $key; in normalize_digits.

Also, I think you can speed things up by using the following:

my @sorted = map { local $_ = $_; s/^.*\0//; $_ } sort map { normalize_digits($_) . "\0$_" } @data;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-26 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found