Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Perl Poetry

( #1590=superdoc: print w/ replies, xml ) Need Help??
"Poetry" is in the eye of the beholder; it could be any of:
  • Poetry written in Perl
  • Using perl to generate poetry
  • Poetry about Perl/PerlMonks
New Poems
The Nymph's Reply to the Shepherd
1 direct reply — Read more / Contribute
by frost_knight
on Nov 06, 2012 at 12:10

    The college I work for recently published a small poetry journal with the theme of romantic love. Submissions had to translate an exisiting poem from English into another language, or vice versa. I submitted this and it was enthusiastically accepted.

    Some lines are a hair over 80 columns. Fitting onto a single page was the highest priority for the publication, so I used less whitespace and more columns than I normally would for production code. The code will run if executed.


    #!/usr/bin/env perl # filename: # description: the nymph's reply to the shepherd # created: before 1599, sir walter raleigh (wraleigh) # modified: 02.14.2012, william fielder (wfielder) # bug tracker: (cmarlowe) successful exit conditions will never be met # bug closed: (wraliegh) nofix, working as designed # === pragmas and globals === # use File::Copy; $world_and_love = 1000; # vast untold +eons $shepherds_tongue = 0; # what a guy $rocks = 300; # warm, degree +s kelvin $philomel = 100; # iq, smart bi +rd $youth = 0; # wasted on th +e young $rivers = "with more than flinty rage"; # apologies to + thom $folly = "the riper should by time decease"; # apologies to + will $season = "rotten apple from the hoard"; # apologies to + geoff @items = qw(gowns, shoes, roses, cap, kirtle, posies); @accessories = qw(belt of straw, ivy buds, coral clasps, amber studs); @joys = qw(date, age, need); # === subroutines === # sub TickTock { $time = localtime(); if (-e "/field/flocks" ) { move("/field/flocks", "/field/fold") || die("cannnot move, $!\n +"); } print("\n$time\n\n"); } # === main === # if (($world_and_love <= 8) && ($shepherds_tongue)) { move("/me/pretty_pleasures", "/thee/thy_love") || die("cannot move, + $!\n"); exit 0; } TickTock(); while (($rivers =~ m/rage/) && ($rocks >= 200)) { $rocks -= 128; $philomel -= 32; push(@the_rest, qw(cares)) || warn("cares: complain\n\n"); } undef($flowers); $wanton_fields = "wayward winter reckoning"; @sorrows_fall = @fancys_spring = ("honey tongue", "heart of gall"); if (($folly =~ m/ripe/) && ($season =~ m/rotten/)) { foreach $item (@items) { undef($item); } } unless (@accessories) { move("/me/to_come", "/thee/thy_love") || die("cannot move, $!\n"); exit 0; } if (($youth) && (-e "/thee/thy_love")) { unless(@joys) { move("/me/delights", "/thee/thy_love") || die("cannot move, $!\ +n"); exit 0; } } exit 1; # eof
Ending it all
No replies — Read more | Post response
by space_monk
on Nov 06, 2012 at 10:59
    I think this one is better than my previous attempt, but they complement each other and form a pair....
    Winter evening
    The monitors stop shining
    It's time for a beer!
Neverending war
No replies — Read more | Post response
by space_monk
on Nov 06, 2012 at 01:49
    Prompted by a dislike of getting up this morning...
    Six thirty; Code waits
    New day fighting new battle
    Core dumps shrapnel
floating down the information stream
No replies — Read more | Post response
by zentara
on Nov 05, 2012 at 07:25
Coming home
1 direct reply — Read more / Contribute
by bibliophile
on Oct 26, 2012 at 09:56
    A brief hiatus
    into the world of Javascript.
    It's good to be back.

wait for @commands
1 direct reply — Read more / Contribute
by Sixtease
on Oct 05, 2012 at 08:30

    Not really a poem, it just struck me how nice the second line of this code sounds:

    for (@commands) { if (fork==0) { exec $_ } }; wait for @commands;
    use strict; use warnings; print "Just Another Perl Hacker\n";
that new Math module haiku
1 direct reply — Read more / Contribute
by zentara
on Sep 13, 2012 at 14:02
    I came upon a great realization today, that one of the best math equations ever, is also a haiku. Whoa momma, I think I might be nearing enlightenment! :-)

    the integral of
    e to the x equals f
    of u to the n

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh
Reflections from the Hermitage
1 direct reply — Read more / Contribute
by Athanasius
on Sep 08, 2012 at 04:59

    5 Perlimericks

    A team of aspiring Perlistas
    Would type till their fingers got blisters.
         But without their espresso,
         The code was a mess, so
    They had to take turns as baristas.
    A Perl coder sheepdog named Shep,
    As a herder acquired a rep —
         An array he did keep
         Full of cows, goats, and sheep,
    Then he gathered the sheep using grep.
    Said the Scribe, as his postings increased,
    “An obsession? No, not in the least!
         With my time I’m restrictive.
         I know it’s addictive.”
    At the last report, he was a Priest...
    An old coder’s wit (not a flash of it!)
    Rejected my Perl (the whole stash of it).
         He’d been coding all day
         An associative array,
    So I said, “Well, you’ve sure made a hash of it!”
    Said the boss, “Java’s pure and sublime;
    To use anything else is a crime.”
         But a rebel named Earl
         Said “I much prefer Perl” —
    And his project was finished on time.

    © 2012

    Athanasius <°(((><contra mundum

Question 2
No replies — Read more | Post response
by Anonymous Monk
on Aug 30, 2012 at 07:28
    sub o{ print@_; scalar <>; } o "How to increase 2 output?\n"; o "More fiber you say?\n"; o "Really?\n"; __END__ How to increase 2 output? eat about 2.5 tablespoons of chia seeds daily More fiber you say? yes, more fiber, but whith chia you also get omega-3 Really? yes, really
3 rhyming haikus (profanity included)
1 direct reply — Read more / Contribute
by nemesdani
on Aug 27, 2012 at 06:33
    I went to the Monks
    Cause I heard that they always
    Think outside the box

    I got an answer
    Written, not oral, it is
    The story's moral:

    I was too casual
    Because I didn't read the
    Fucking manual

    I'm too lazy to be proud of being impatient.

Add your poem
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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others chanting in the Monastery: (6)
    As of 2016-02-09 08:48 GMT
    Find Nodes?
      Voting Booth?

      How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

      Results (309 votes), past polls