Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: Sort on Number Embedded in String

by Dru (Hermit)
on Mar 22, 2005 at 19:51 UTC ( #441593=note: print w/replies, xml ) Need Help??

in reply to Re: Sort on Number Embedded in String
in thread Sort on Number Embedded in String

Thanks friedo (and everyone else). I find your solution the easiest to understand. I know you didn't recommend the Schwartzian Transform for this problem, but I must read up on it since I've never even heard of it. It appears to be popular amongst the monks :-).

This place is great, in less then 30 minutes, I received a half dozen replies.
  • Comment on Re^2: Sort on Number Embedded in String

Replies are listed 'Best First'.
Re^3: Sort on Number Embedded in String
by Mugatu (Monk) on Mar 22, 2005 at 21:09 UTC
    The ST is a neat trick, and fun to learn about. In some cases, it is a very good optimization. But you should pay attention to friedo's comments. Often times the naive sort is fast enough that the overhead of the ST is not worth it, and it will almost always be easier to read than an equivalent ST.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://441593]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2018-06-21 10:08 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (118 votes). Check out past polls.