Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Some Help for a Report About Perl

by BillKSmith (Monsignor)
on Nov 01, 2017 at 20:09 UTC ( [id://1202548]=note: print w/replies, xml ) Need Help??


in reply to Some Help for a Report About Perl

One feature that distinguishes perl from most other languages is its powerful regular expressions. This alone can make it the language of choice for almost any text editing task. Unfortunately, this is probably the basis for most of the criticism that we see about perl's syntax. A poorly written regex can look like the work we expect from monkeys at typewriters.
Bill

Replies are listed 'Best First'.
Re^2: Some Help for a Report About Perl
by stevieb (Canon) on Nov 01, 2017 at 20:29 UTC

    That's another absolutely huge one, and in fact, Perl has dictated its own widely-used standard: "Perl Compatible Regular Expression" (PCRE). I agree with the typewriter monkey if not used well.

    One distribution I've contributed to a few times over the years is Email::Valid. Check out this regex that's part of it. By far, it is not poorly written, but in the past in a ticket or a patch, another contributor stated (paraphrased as I can't recall the exact wording), 'I'm not touching that regex; it's a thing that is made of nightmares' :)

    Another thing, Perl is the "Practical Extraction and Reporting Language".

      > it's a thing that is made of nightmares

      This is part of hard things possible infact if you watch it from left: comply with an entire (or more) RFC in just one statement is an hard goal to achieve!

      L*

      There are no rules, there are no thumbs..
      Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

        ...and that, because in a past life I knew nearly the whole RFC by heart, is one damned hard thing that became possible in literally, a single scalar variable.

      Another thing, Perl is the "Practical Extraction and Reporting Language"

      Please be aware that the name "Perl" is not an acronym. From learn.perl.org:

      "Perl" is the name of the language. Only the "P" is capitalized. The name of the interpreter (the program which runs the Perl script) is "perl" with a lowercase "p" ... But never write "PERL", because perl is not an acronym.
      Larry originally chose the name "Perl" -- after going through every single word in the dictionary! -- arbitrarily for its positive connotations. Actually, he originally chose "Pearl", but that name was already taken. So your "Practical Extraction and Reporting Language" is a backronym, invented after Larry had already chosen the name. One source for this is the draft Oxford English Dictionary entry:
      Perl Brit.
      Perl, perl, irreg. PERL
      Computing.
      perl n. ,
      arbitrarily chosen for its positive connotations, with omission of -a- to differentiate it from an existing programming language called Pearl. Coined by Larry Wall in the summer of 1987; the program was publicly released on 18 December of that year. Acronymic expansions of the name (such as Practical Extraction and Report Language and Pathologically Eclectic Rubbish Lister), though found in the earliest documention for the language, were formed after the name had been chosen. Coinage details confirmed by personal communication from L. Wall, May 2000. A high-level interpreted programming language widely used for a variety of tasks and especially for applications running on the World Wide Web. The form Perl is preferred for the language itself; perl is used for the interpreter for the Perl language.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-03-28 17:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found