Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Yule log.

by frankus (Priest)
on Dec 06, 2001 at 18:16 UTC ( #129911=poem: print w/replies, xml ) Need Help??

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.


Replies are listed 'Best First'.
Re: Yule log.
by giulienk (Curate) on Dec 07, 2001 at 18:27 UTC
    This is great! I really feel like it's Christmas :)


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: poem [id://129911]
Approved by root
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (1)
As of 2017-07-27 01:44 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (402 votes). Check out past polls.