Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

It's been a while...

#!/usr/bin/perl -sire package a;sub used{$_[1]}sub was{$_[-1].=~~reverse($^I).',';;print$_[1 +] }package main;sub his::parsing{' tsuJ'}sub when::hammer{~~reverse$_[1] +} sub oft::he{my($ self,$ he)=@_;my$ c=join'',sort qw(t o n);$ he=~s/(.* +) /\1a${c}h$^I /x&&$he}sub DWIM::nevermore{$_[-1].'P'}sub would::perl{$d += $_[-1].$^I.chr 108}sub whose::jim{$J=$ _[1];$J=~s/(r)(e)/\2\1/g;$J }su +b named::gentleman{$e.=$ _ for qw*a c k*;$_[-1].' h'.$e}sub once::there{ +} there once was a gentleman named jim whose perl would nevermore DWIM he oft used a hammer when parsing his grammar and never the wiser was him
Updated

I wrote this quite a long time ago, but never posted it. While I was cleaning up my homedir, I found it and decided to post it. Then I went out for some errands, thinking about *why* I hadn't gotten around to posting it, and I think the answer was "the limerick isn't that good". So on the drive back, I updated it a little, and above are the results, while the original I posted is here:

#!/usr/bin/perl -sire package a;sub used{$_[1]}sub was{$_[-1].=~~reverse($^I).',';;print $_[1]}package main;sub his::parsing{' tsuJ'}sub when::hammer{~~reverse $_[1]}sub oft::he{my($self,$ he)=@_;my$ c=join'',sort qw(t o n);$ he=~ s/(.*)/\1a${c}h$^I /x&&$he}sub dim::incredibly{$_[-1].'P'}sub was::lig +ht{$d=$_ [-1].$ ^I.chr 108}sub whose::jim{$J=$ _[1];$J=~s/(r)(e)/\2\1/g;$J } su +b named::gentleman{$e.=$ _ for qw*a c k*;$_[-1].' h'.$e}sub once::there{ +} there once was a gentleman named jim whose light was incredibly dim he oft used a hammer when parsing his grammar and never the wiser was him


--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)

In reply to There once was a gentleman... by chargrill

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-25 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found