Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Sorting records on a single field

by almut (Canon)
on Jan 20, 2010 at 17:25 UTC ( [id://818512]=note: print w/replies, xml ) Need Help??


in reply to Sorting records on a single field

As always, just give pointers in the right direction.

Ok, here are your pointers :)

  • Use a regex or split to extract the column of interest
  • Use the Schwartzian Transform to do the actual sorting. The ST avoids having to do the (relatively expensive) extraction procedure anew for each pairwise comparison ($a <=> $b).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-26 09:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found