http://www.perlmonks.org?node_id=363212


in reply to Bottle Golf

whoops, i guess my first attempt was a little off. Also, bottle should be pluralized except when there is 1 bottle left. Even zero bottles is plural.

played a little more, here something better, without a sub
print join "\n", map { "and if 1 green bottle should accidentally fall +\n" ."there'll be " . ($_-1) . " green bottle" .($_!=2?'s':'') . ", standing on a wall\n" } (reverse 1..10);

(hopefully correct)

Replies are listed 'Best First'.
Re^2: Bottle Golf
by shemp (Deacon) on Jun 10, 2004 at 22:17 UTC
    This may be a bit off topic, but could people let me know why i got voted down for this post?
    Im thoroughly perplexed!
      There are any number of reasons that people downvote, ranging from thinking your post was overrated to XP whoring to retaliation for somebody doing it to them. If you don't see a problem with your post and they can't be bothered to point it out, don't worry about it.

      We're not really tightening our belts, it just feels that way because we're getting fatter.