Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Sort routine

by dada (Chaplain)
on Sep 18, 2002 at 11:56 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-25 14:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found