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

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.

¤

Comment on Yule log.
Download Code
Re: Yule log.
by giulienk (Curate) on Dec 07, 2001 at 18:27 UTC
    This is great! I really feel like it's Christmas :)

    gkinueliileunikg

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: poem [id://129911]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2014-08-29 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (277 votes), past polls