As ever with my poetry/obfu it's not clear if it's obfu as it's
just unpleasant to read, and it's not really poetry either.. ho hum
What the hell, it's Christmas:

#!/usr/bin/perl ($_,@_)=<DATA>;s/s//;s/^/On /;$~=$_;for$i(0..11){if($i<3){$_=(qw/ firs +t second third/)[$i]}else{$_=$_[$i];s/\s.*?$//g;s/ve$/f/;s/$/th/}$l=$~;$l=~s/tw +elve/$_/ ;print"\n$l";$i==1 and $_[0]=~s/^/and /;for($j=$i;$j>=0;){print"$_[$j- +-]"}}$/= 0;print"\nTotal:\n",map{($i,$_)=($_+1,$_[$_]);do{s/a //g;s/e(\W)/es$1/ +g}if/^a/ ;s/^\w+/($#_-$i)*$i/e;/\d+/;$/+=$&;$_}0..11;print'-'x30,"\n$/ non-geek + gifts\n" __END__ the twelve days of christmas, my true love gave to me a Partridge in a pear tree 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

Updated: removed uh ... features.

  1. Thanks to Erudil for spotting them.
  2. Note to self test download in scratchbox first

--

Brother Frankus.

¤


In reply to Yule log. by frankus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.