Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Article on Perl

by dru145 (Friar)
on Jan 22, 2002 at 19:08 UTC ( [id://140666]=perlmeditation: print w/replies, xml ) Need Help??

Computerworld has an article explaining Perl to someone who has never used it before.

Dru
Another satisfied monk.

Replies are listed 'Best First'.
(Ovid) Re: Article on Perl
by Ovid (Cardinal) on Jan 22, 2002 at 22:19 UTC

    Thanks for the link. Interesting article, but I don't feel that it explained Perl very well. It's such a generic description that it one could pretty much do a s/Perl/other language/g; and it would still be mostly accurate. Two big nits with the article:

    ...Perl stands for Practical Extraction and Reporting Language...

    No, it doesn't. Perl doesn't stand for anything. The above acronym is just one that someone (who?) came up with and it attained the status of Urban Programming Legend.

    The other nit is a huge one. Check out the program the author lists for generating HTML for displaying photos. Here's one of the choice lines of code that's listed:

    print HTMLFILE "\<P\>\<a href\=\"http\:\/\/index.html\"\>Return to hom +e page\<\/a\>\<\/font\>\n";

    Yeah, that's going to make me want to run for the hills. Not only does the author use double quotes, forcing the escaping of embedded double quotes, she escapes many items that don't need to be escaped. Just glancing at that line will convince many programmers that Perl does indeed have too much punctuation. (nitpickers might notice that the double-quotes are superfluous since nothing is interpolated, but that's a minor point since Perl is smart enough to optimize this). Here's one way to write the above line:

    print HTMLFILE '<P><a href="http://index.html">Return to home page</a> +</font>\n';

    Aah! Much cleaner. Of course, there are other problems in the code that we'd probably point out here:

    • No strict
    • No warnings
    • Multiple prints instead of HERE docs
    • Substituting out newlines instead of using chomp
    • Useless switching out of variables: $htmlroot = $htmlroot1;
    • Using a while loop with a counter and incrementing the counter
    • Bad HTML
    • Aack!!! I can't stand it any more!!!

    There are more problems than those above, but I think you get the idea. Selling people Perl by writing bad Perl is a terrible way to go.

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

      Perl doesn't stand for anything. The above acronym is just one that someone (who?) came up with and it attained the status of Urban Programming Legend.
      Unfortunately, the person who came up with the acronym 'Practical Extraction and Report Language' was Larry Wall (which is one of the reasons this insidious Urban Legend is so hard to get rid of).

      Impossible Robot
What is the ComputerWorld App/Web Development Knowledge Center? {Re: Article on Perl}
by dave_aiello (Pilgrim) on Jan 22, 2002 at 23:08 UTC
    I am a little perplexed by the existence of this article about Perl in the section of Computerworld's site called "App/Web Development Knowledge Center". Check out the range of articles that appear in this section. Note that no other programming language gets its own explanatory article. Is this an indication that they will publish articles on Java, Tcl, Python, ColdFusion, VBscript, etc., in the future?

    Also, I found this list of Perl web resources published on the ComputerWorld web site. PerlMonks is not on that list, and I think it should be.

    Dave Aiello
    Chatham Township Data Corporation

Re: Article on Perl
by waggerz (Pilgrim) on Jan 22, 2002 at 21:13 UTC
    Just want to say thank you for the article, I found it useful and informative.
Re: Article on Perl
by ralphie (Friar) on Jan 22, 2002 at 22:37 UTC
    i find it interesting that computerworld feels that it needs to do an article explaining perl. there's something screwy here. i should say that i consider computerworld to be among the least trendy and most solid of the tabloid computer press, probably amongst the most conservative, and i value it largely bacause of that. but i have a hard time believing that we'd see a similar article explaining java, and regardless of one's evaluation of the relative importance of java i would think it fair to state that perl is of the same magnitude in significance. (note how i bend over backward to give the devil his due
    :-)
    ).

    maybe this is just first day after a 3-day weekend stuff ... if this had been somewhere else i wouldn't be commenting. maybe i missed something. is there another in this series explaining cobol? that's one i'd like to figure out. (;->)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://140666]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found