In response to johnathon's question, I tried to make a poem without using my or die!
$patience = 15; # how many years can you wait for happiness? $happy = -10; # how happy are you now? $cant_go_on = -5000; # how unhappy can you be before its not worth +it? $memory = 16384; # how much can you remember? # What makes life good? @GOODTHINGS = ("love", "beauty", "innocence", "happiness", "friends", +"nature", "life"); # What makes it painful/stressful/depressing? @BADTHINGS = ("greed", "money", "power", "corruption", "depression", " +lunacy", "illness", "death"); CONSIDER: { open(LIFE, "<life.txt"); } # reflect on our life.. CYCLE: while(!$happy && $patience) { select LIFE; $age++; $time = tell; $patience--; read LIFE, $year, $memory; $memory--; if($year) { foreach $good (@GOODTHINGS) { while($year =~ /$good/g) { $happy++; } } foreach $bad (@BADTHINGS) { while($year =~ /$bad/g) { $happy--; } } } } if(!$patience) { # reconsider our life if we've run out of patience goto CONSIDER unless $happy <= $cant_go_on; $happy=undef; # if we can't go on, then sleep forever sleep; } else { # revel in our happiness! &enjoy($happy); redo CYCLE; # continue our life.. } sub enjoy { $reset = 0; $patience = 15 - ($age/15); # Regen patience :) $memory = 16384 - 10*$age; # Refesh your mind :) $happy = $reset; # but now it wears off.. }

maybe I should stop writing perl poetry and get back to work? hehehehe..

-brad..

In reply to and so it goes.. by reyjrar

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.