Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 romping around the Monastery: (2)
As of 2014-09-24 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (246 votes), past polls