Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re (tilly) 1: Golf: Arbitrary Alphabetical Sorting

by tilly (Archbishop)
on May 09, 2001 at 21:30 UTC ( #79177=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    sub o{
    ($c,$s)=@_;@m{@$c}=map{10*@$c+$_}0..@$c;sub t{$_=pop;s/./$m{$&}/gs;$_}
    +sort{t($a)cmp t($b)}@$s
  2. or download this
    sub o{
    ($c,$s)=@_;@m{@$c}=map{$_+9999}1..@$c;sub t{$_=pop;s/./$m{$&}/gs;$_}so
    +rt{t($a)cmp t($b)}@$s
  3. or download this
    sub o{
    ($c,$s)=@_;@m{@$c}=map$_+9**9,1..@$c;sub t{$_=pop;s/./$m{$&}/gs;$_}sor
    +t{t($a)cmp t$b}@$s
  4. or download this
    sub o{
    ($c,$s)=@_;@m{@$c}=map$_+1e9,1..@$c;sub t{$_=pop;s/./$m{$&}/gs;$_}sort
    +{t($a)cmp t$b}@$s
  5. or download this
    sub o{
    ($c,$s)=@_;@m{@$c}=map$_+~0,1..@$c;sub t{$_=pop;s/./$m{$&}/gs;$_}sort{
    +t($a)cmp t$b}@$s
  6. or download this
    sub o{
    ($c,$s)=@_;@m{@$c}=1e8..@$c+1e8;sub t{$_=pop;s/./$m{$&}/gs;$_}sort{t($
    +a)cmp t$b}@$s

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2015-11-29 04:34 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (746 votes), past polls