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

inman has asked for the wisdom of the Perl Monks concerning the following question:

Probably done before. Generate the rhyme '10 green bottles...'
#! /usr/bin/perl -w foreach (reverse 1..10){ sub wall {$a=$_-1?'s':'';"$_ green bottle$a, standing on a wall\n"} print wall($_)x2, "and if 1 green bottle should accidentally fall\nthere'll be ", wall(--$_),"\n"}
Any other methods?