Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Sort routine

by dada (Chaplain)
on Sep 18, 2002 at 11:56 UTC ( #198801=note: print w/replies, xml ) Need Help??


in reply to Sort routine

this seems a perfect case for a Schwartzian Transform:
@event_queue = map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { [$_, split /\t/, $_, 1] } @event_queue;
cheers,
Aldo

King of Laziness, Wizard of Impatience, Lord of Hubris

Replies are listed 'Best First'.
Re^2: Sort routine
by Aristotle (Chancellor) on Sep 18, 2002 at 20:09 UTC
    You do, of course, mean map { [$_, split /\t/, $_, 2] }

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2022-05-29 04:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (101 votes). Check out past polls.

    Notices?