99 bottles of beer
Author: Gerhard R
Print the lyrics to the 99 bottles of beer song.
Source code: bottles.pl
use v6; my @bottles = (flat ((99...2) X~ ' bottles'), '1 bottle', 'no more bottles', '99 bottles'); my @actions = (flat 'Take one down and pass it around' xx 99, 'Go to the store and buy some more'); for flat @bottles Z @actions Z @bottles[1..*] { say "$^a of beer on the wall, $^a of beer. $^b, $^c of beer on the wall.\n".tc; }