print "There " . ($count == 1 ? " is " : " are " ) . " $count piece" . ($count == 1 ? "s" : "" ) . " of pizza left.\n";I got to ask. Given that you already have a line of code, what makes you think it's easier to ask on Perlmonks whether than line of code works, than to run it?Is this possible?
In reply to Re: one-line conditional print?
by JavaFan
in thread one-line conditional print?
by MrSnrub
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |