Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: one-line conditional print?

by jpl (Monk)
on May 17, 2011 at 12:09 UTC ( [id://905248]=note: print w/replies, xml ) Need Help??


in reply to Re: one-line conditional print?
in thread one-line conditional print?

Interesting module (it's pointers like this that keep me hanging around the monastery). Tiny quibble: you need curlies to have a 0-based index.
print pluralize "There (is|are) (no|one|%d) slice(s) of pizza left.", +0; There are 0 slices of pizza left. print pluralize "There (is|are) (no|one|%d) slice(s) of pizza left.", +1 There is no slice of pizza left. print pluralize "There (is|are) {no|one|%d} slice(s) of pizza left.", +0; There are no slices of pizza left.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-18 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found