If you can live with the risk of the sub stomping on the callers copy of $_ by not localising it, then you could trim a couple more keystrokes by using pop instead of shift, and you also can trim the regex by another 1
pop;/1./?0:qw(0 st nd rd)[$_%10]or'th'
In reply to Re: Re: English Date-Suffixes
by BrowserUk
in thread English Date-Suffixes
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |