Twelve Days of Christmas by MG

@a=(first,second,third,fourth,fifth,sixth,seventh,eighth,ninth,tenth,eleventh,twelfth);$c=' partridge in a pear tree';@b=("And a$c",'Two turtle doves,','Three French hens,','Four calling birds,','Five golden rings,','Six geese a-laying,','Seven swans a-swimming,','Eight maids a-milking,','Nine ladies dancing,','Ten lords a-leaping,','Eleven pipers piping,','Twelve drummers drumming,');for(0..11){print"On the $a[$_] day of Christmas,\nmy true love sent to me\n";if($_==0){print"A$c.\n\n";next}print join("\n",reverse @b[0..$_]).($_==11?"!\n":".\n\n")}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page