Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Dear powerman,

almost all has been said so far in response to your valuable posting, but one point is missing.

print "Howdy, world!\n";

is one reason why people code in perl, which is really two, as expressed elsewhere:

  • you can babble in perl, drawl, jargonize, extemporize, speak volumes, drone, singsong, ad-lib, or eloquently express yourself with mastery; and
  • as the saying goes, "perl is the language to get your job done before your boss fires you." Corollary: "you do a good job as long as it's worth doing it well" (something like this is in the first Camel Book).
Your way of speaking seems like trying to lay down the law.

Another reason for coding perl is aptly demonstrated by

$=[!print$=]=!map{$==$=[$#z]+=$=[@z]/@z,($=[@z]%=1+$#z--).=0}@z=@=for@ +==(1)x pop
which snippet calculates the Euler constant (1st argument is number of digits - credit is due to a wizard on the #perlgolf irc channel (not me :-)).

Another way goes like this:

use HTTP::Cache::Transparent (); use LWP::Simple qw(get); use Compress::Zlib (); HTTP::Cache::Transparent::init({BasePath => "/tmp/http-cache-transpare +nt-$>"}); my $gzipped = get ""; my $quotes = Compress::Zlib::memGunzip($gzipped); my @quotes = split /\n%%\n/, $quotes; print $quotes[rand @quotes], "\n";

Yet another splendid way of writing perl are the gems Erudil has posted.

A flavour of perl coding which I particularly like and greatly admire is Lingua::Romana::Perligata --

#! /usr/local/bin/perl -w use Lingua::Romana::Perligata; adnota Illud Cribrum Eratothenis maximum tum val inquementum tum biguttam tum stadium egresso scribe. vestibulo perlegementum da meo maximo . maximum tum novumversum egresso scribe. da II tum maximum conscribementa meis listis. dum damentum nexto listis decapitamentum fac sic lista sic hoc tum nextum recidementum cis vannementa da listis. + next tum biguttam tum stadium tum nextum tum novumversum scribe egresso. cis

With these examples I'm trying to mark (some) cornerstones of what perl is, and all of these are good uses of perl and splendid ways to make life interesting.

Ah, and don't let us forget the Acme namespace - that's all more Monty Python than any so-called python (scnr).

<update why="the point">
None of these coding examples are in any way meant to be reliable in other sense than "if it ain't broke, don't fix it".

I've upvoted your post, partly because it does adress a valid concern, partly because it rouses a good discussion, and partly because it's good if from time to time a pilgrim comes back to the monastery to shout

at the fellow monks sitting at the table. I hope you'll not loose your harsh tone and your engagement in the quest (feel free to set up the domain - it's untaken at the moment - to publish the Carat weight of CPAN modules you come across :-), but don't go down the wrong way, don't end up like Jorge of Burgos who died poisoned by his own wrath.

Anyways - if you want really reliable code - you probably shouldn't use perl at all. Perl comes with all the ambiguities natural languages have. You should take the right tool for that, C perhaps, or assembler, and scrutinize the libraries your code uses, the underlying OS and the chips that OS runs on.

Last thing - CPAN isn't a holy cow at all. It's more aptly described as an ecosystem - there are so many interdependencies of modules, which reliably infest each others with parasites, pollution, bugs and even sudden death, cot death... there's no way to stand that but with the firm belief in your own open eyes, skill, and the good intent of your fellow coders.

Your good intent is highly welcome .


_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

In reply to Re: Reliable software OR Is CPAN the sacred cow by shmem
in thread Reliable software: SOLVED (was: Reliable software OR Is CPAN the sacred cow) by powerman

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 or How to display code and escape characters are good places to start.
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2022-08-16 01:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found