Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: English Date-Suffixes

by mtve (Chaplain)
on Nov 10, 2002 at 09:36 UTC ( #211744=note: print w/ replies, xml ) Need Help??


in reply to Re: English Date-Suffixes
in thread English Date-Suffixes

small improvement:

(0,st,nd,rd)[pop=~/1?./g]||th


Comment on Re: Re: English Date-Suffixes
Download Code
Re: Re: Re: English Date-Suffixes
by petral (Curate) on Nov 12, 2002 at 20:07 UTC
    Wow, didn't know about dropping the qw!
    Why does the ||th  lead to only returning the last value from the /1?./g -indexed list?

    Update:  I see, it becomes a comma list which returns the last value ("the result of the last expression").
    see, A list returns its last, an array returns its weight

      p

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://211744]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (15)
As of 2014-07-29 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (226 votes), past polls