in reply to one-line conditional print?
Consider Text::Pluralize.
print pluralize "There (is|are) (no|one|%d) slice(s) of pizza left.", $count);
Q.E.D.
Note that this strategy, “slick” though it is, may or may not be appropriate for languages other than English. It is not a general “I18N” solution.
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: one-line conditional print?
by jpl (Monk) on May 17, 2011 at 12:09 UTC |