http://qs321.pair.com?node_id=211093


in reply to English Date-Suffixes

And qw(0 st nd rd)[pop=~/(1?.)$/]or"th" will do any integer.


Note that for pre-5.6 perl you have to do (qw(...))[index]because qw was translated into  split' ','...' during compilation.

  p