We're assuming good input anyway, so we can shave another off...
Which drops us to 33.sub num2ord { local $_ = shift; # 1 2 3 4 # 123456789012346789012345678901234567890 $_.(qw(0 st nd rd)[/1?.$/g]||th) }
-sauoq "My two cents aren't worth a dime.";
In reply to Re^4: Golf - Ordinal Suffixes
by sauoq
in thread Golf - Ordinal Suffixes
by sauoq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |