good chemistry is complicated,and a little bit messy -LW PerlMonks

### 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??

```sub o{
(\$c,\$s)=@_;@m{@\$c}=map{10*@\$c+\$_}0..@\$c;sub t{\$_=pop;s/./\$m{\$&}/gs;\$_}
+sort{t(\$a)cmp t(\$b)}@\$s
}
```
```sub o{
(\$c,\$s)=@_;@m{@\$c}=map{\$_+9999}1..@\$c;sub t{\$_=pop;s/./\$m{\$&}/gs;\$_}so
+rt{t(\$a)cmp t(\$b)}@\$s
}
```
```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
}
```
```sub o{
(\$c,\$s)=@_;@m{@\$c}=map\$_+1e9,1..@\$c;sub t{\$_=pop;s/./\$m{\$&}/gs;\$_}sort
+{t(\$a)cmp t\$b}@\$s
}
```
```sub o{
(\$c,\$s)=@_;@m{@\$c}=map\$_+~0,1..@\$c;sub t{\$_=pop;s/./\$m{\$&}/gs;\$_}sort{
+t(\$a)cmp t\$b}@\$s
}
```
```sub o{
(\$c,\$s)=@_;@m{@\$c}=1e8..@\$c+1e8;sub t{\$_=pop;s/./\$m{\$&}/gs;\$_}sort{t(\$
+a)cmp t\$b}@\$s
}
```

Create A New User
Node Status?
node history
Node Type: note [id://79177]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2018-11-15 15:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
My code is most likely broken because:

Results (186 votes). Check out past polls.

Notices?