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

Re: 99 bottles of beer on the wall

Thread Previous | Thread Next
May 27, 2003 20:14
Re: 99 bottles of beer on the wall
Message ID:
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" - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About