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

Re: sorting an array

by pKai (Priest)
on Jul 10, 2009 at 11:59 UTC ( #778907=note: print w/replies, xml ) Need Help??


in reply to sorting an array

map {'ch'.(0+$_)} sort map {sprintf "%.10u", /(\d+)/} @array;

just for the sake of using a technique of Advanced Sorting - GRT - Guttman Rosler Transform, i.e. make a map sort map but with a bare/string sort.

Of course, a pack 'N' would be preferable over the sprintf.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://778907]
help
Chatterbox?
[erix]: it seems so far-fateched and illogical
[erix]: islanders a deviant bunch
[LanX]: Dutch education needed!
[erix]: Battle of the Boyne?

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2017-03-24 18:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (305 votes). Check out past polls.