inman has asked for the wisdom of the Perl Monks concerning the following question:
Probably done before. Generate the rhyme '10 green bottles...'
Any other methods?#! /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"}
Back to
Seekers of Perl Wisdom