Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re (tilly) 3: Golf: Arbitrary Alphabetical Sorting

by tilly (Archbishop)
on May 10, 2001 at 00:40 UTC ( #79243=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub o{
    ($c,$s,$")=@_;sub t{$_=pop;s/./~0+index"@$c",$&/ges;$_}sort{t($a)cmp t
    +$b}@$s
    }
    
  2. or download this
    sub o{
    ($c,$s,$")=@_;sub t{$_=pop;s/./1e9+index"@$c",$&/ges;$_}sort{t($a)cmp 
    +t$b}@$s
    }
    
  3. or download this
    sub o{
    ($c,$s,$")=@_;sub t{s/./1e9+index"@$c",$&/ges;$_}sort{t($_=$a)cmp t$_=
    +$b}@$s
    }
    
  4. or download this
    sub o{
    ($c,*w,$")=@_;sub t{s/./1e9+index"@$c",$&/ges;$_}sort{t($_=$a)cmp t$_=
    +$b}@w
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2015-07-31 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls