# The Ant
# by Ogden Nash
# The ant has made himself illustrious
# Through constant industry industrious
# So what?
# Would you be calm and placid
# If you were full of formic acid?
sub ant { bless \my $self }
sub make {
$self = shift;
use constant INDUSTRY => 'industrious';
$$self = INDUSTRY;
$$self =~ s/nd/ll/;
bless $self;
}
$ant = ant();
$ant->make();
if (0 or 1) {
$you = ($you=~/^(formic acid)+$/ and int rand 2) ? 'calm and placi
+d' : '';
}
Update: Wow. Thanks a lot VSarkiss! I've never realized just how fun perl poetry actually was. I'm hooked now. An annotated version. . .
# The Ant
# by Ogden Nash
# The ant has made himself illustrious
# Through constant industry industrious
# So what?
# Would you be calm and placid
# If you were full of formic acid?
sub ant { bless \my $self } # Some setup.
sub make {
$self = shift;
# through constant industry industrious
use constant INDUSTRY => 'industrious';
$$self = INDUSTRY;
$$self =~ s/nd/ll/; # industrious is now illustrious
bless $self;
}
$ant = ant(); # More setup. (We need an ant.)
$ant->make(); # The Ant has made himself illustrious [see make()]
if (0 or 1) { # So What?
# would you be 'calm and placid' if you were full of
# formic acid? (The rand leaves it a question.)
$you = ($you=~/^(formic acid)+$/ and int rand 2) ? 'calm and placi
+d' : '';
}
-sauoq
"My two cents aren't worth a dime.";
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|