in reply to Re^5: Golf - Ordinal Suffixes
in thread Golf - Ordinal Suffixes
Those ** should be 456, not 46 - that appears to have been copied by everyone ;)sub num2ord { local $_ = shift; # 1 2 3 4 # 1234567890123**789012345678901234567890 $_.((0,st,nd,rd)[/1?.$/g]||th) }
sub num2ord { local $_ = shift; # 1 2 3 # 123456789012345678901234567890 $_.=(0,st,nd,rd)[/1?.$/g]||th }
|
|---|