Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re (tilly) 3: Golf: Arbitrary Alphabetical Sorting

by tilly (Archbishop)
on May 10, 2001 at 00:40 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://79243]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-19 14:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found