Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

The song of Aragorn

by Fengor (Pilgrim)
on Dec 21, 2001 at 15:59 UTC ( [id://133740]=poem: print w/replies, xml ) Need Help??

Erudil's poem about The Doom of the Noldor has inspired me to this little poem. It's my first try, so please be gentle with me *g*
#!/usr/bin/perl # # Song of Aragorn by J.R.R. Tolkien # # All that is gold does not glitter, # Not all those who wander are lost; # The old that is strong does not wither, # Deep roots are not reached by the frost. # # From the ashes a fire shall be woken, # A light from the shadows shall spring; # Renewed shall be blade that was broken, # The crownless again shall be king. $_='Song of Aragorn'; $all{'gold'} = 'not glitter'; foreach $wanderer ([0,1,0,0,0]) { if ($wanderer) {print 'not lost'}} unless ($old eq 'strong') {$old--} if ($roots ne 'deep') { $roots='frost' } ashes('wake'); $light=shift @shadows; $blade = join ('blade', 'that', 'was', 'broken'); $crownless='king'; sub ashes { my $action=shift; if ($action eq 'wake') { print 'fire' } }
Atenio ;-)

--
"WHAT CAN THE HARVEST HOPE FOR IF NOT THE CARE OF THE REAPER MAN"
-- Terry Pratchett, "Reaper Man"

Replies are listed 'Best First'.
Re: The song of Aragorn
by rob_au (Abbot) on Dec 21, 2001 at 16:40 UTC
    Very neat, one change which I would make ...

    $blade = join ('blade', 'that', 'was', 'broken');

    ... to the following ...

    $blade = join '', split ('', 'blade');

    Otherwise, quite timely and neat ... ++Fengor

     

    perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'

      Hmmm nice idea, but i think I'll leave it as it is. But i'll remember this use of split for further poems ;-)

      thank you
      fengor

      --
      "WHAT CAN THE HARVEST HOPE FOR IF NOT THE CARE OF THE REAPER MAN"
      -- Terry Pratchett, "Reaper Man"

Re: The song of Aragorn
by moeffju (Initiate) on Dec 27, 2001 at 20:15 UTC
    Yap, very nice, buuut.. shouldn't the "fire" be in quotes?
    Otherwise: rules :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-18 06:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found