develooper Front page | perl.fwp | Postings from May 2003

Re: 99 bottles of beer on the wall

From:
=?iso-8859-1?q?Andrew=20Savige?=
Date:
May 27, 2003 20:14
Subject:
Re: 99 bottles of beer on the wall
Message ID:
20030528031431.9663.qmail@web10909.mail.yahoo.com
Ton Hospel wrote:
> With a little more effort by mtve and me this becomes:
>
> sub
> b{[@b=(abs||n.o,bottle."s"x!!++$_,of,beer),on,the,wall]}print
> "@{+b},\n@b,\nTake one down, pass it around,\n@{+b}.\n"
> for-pop||-99..-1
>
> (which also has the "no" for 0 bottles. use ~99 if you want the song
> to start with 100 bottles).

Another delightful and artistic solution from my two favourite
golfers, he says, peering at solution, and wondering if Mtv
has broken his own law* yet again.

Changing n.o to No saves a stroke (and is arguably better English).

/-\

(*) Mtv's Law: "Regexes always win"


http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About