Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Some Help for a Report About Perl

by TDL4 (Novice)
on Nov 01, 2017 at 18:01 UTC ( #1202542=perlquestion: print w/replies, xml ) Need Help??

TDL4 has asked for the wisdom of the Perl Monks concerning the following question:

Hello all dear monks, I'm a Computer Science student, and I'm taking a Concepts of Programming Languages course. I've been asked to write a report (In a group) detailing a language of my choosing, I chose Perl since I heard Larry Wall talk about the 5 languages everyone should learn about and Perl caught my attention. I just thought I might find some help here regarding an overview of the language and maybe somewhat of an evaluation or cost considerations. Just some headers or resources would be fine, I don't expect any one to write the report for me or anything ;) Many a thank wisdom Perl Monks.

Replies are listed 'Best First'.
Re: Some Help for a Report About Perl
by Discipulus (Abbot) on Nov 01, 2017 at 19:16 UTC
    Hello TDL4 and welcome to the monastery and to wonderful world of Perl!

    As incipit I must admit I'm not so qualified to answer you because I just know Perl and no other programming languages, so I miss the perspective.

    So just some sparse hints for you, to take inspiration maybe.

    Perl was designed (and it's actively maintained!) to Make Easy Things Easy & Hard Things Possible

    This basic principle is a red thread in Perl history: Perl can easily vary from bash like scripting (on steroids), to be included in some pipeline of commands till big or enormous platforms (iirc the whole booking.com). Perl can produce GUI easily using Tk Prima or Gtk

    It is a very high level language with a very high signal/noise ratio: it is very expressive and this is the good side of the medal of having a somehow scary appearence in it's syntax.

    Perl has CPAN and this is very big plus: imagine a programming problem, I bet some solution is already done in CPAN: 193,966 Perl modules at your disposal is not taht bad. Perl has avery active community and many new and old projects are the top in their fields: Plack Dancer2 and Mojolicious for the web, MCE for parallel processing, PDL for scientifics, bioinformatics..

    Perl is many time referred as a glue language: it's true! Perl can communicate with every part of an informatic system, can wrap almost anything, can report in many way.. This has a limit: perl is no good to write hardware driver. The reamining is enough.

    Perl is probably the second best language to deal with UNICODE: not that is easy but this is not entirely a Perl's fault.. In addition Perl has the best regular expression implementation you can imagine: almost a language in the main one: powerful and terrificly fast (Note: the last paragraph was added while other monks were adding comment about regexes).

    Perl does not force you to act it's way: the TMTOWTDI karma is always valid: with Perl you can program somthing similar to C or use full featured class aware systems, mimicry functional programming or just get the job done.

    Get the job done.. yes with Perl you'll have a quick working solution very soon: then you can improve it (if it's worth to).

    Perl has a lovingly error reporting system: this is big plus in short and long term. More: you can extend that error reporting and debugging system at your will. Perl itself poses no barrier to you: black and white magic are at your disposal if you need (symbol table and notably eval where you can watch at the Perl compiler from a Perl program)

    Perl is no more the "Fashion language" it was in the end of the century, but still runs everywhere in old and new systems.

    Perl is born in UNIX/Linux world but can run effectively on MS windows ( see strawberryperl.com or activestate Perl too) MacOS and other OSs.

    Now some link: a must read is Modern Perl (free pdf) and the whole Modern Perl site (update: by chromatic who once said this) and for language comparison this one(2012) and TIOBE (2017).

    Most well-known Perl-powered product? Why do people say 'Perl' is dead?!?! and Should I come back to Perl? are good nodes here at the monastery: I have other ones in my homenode (see also answer to Perl viewpoint from stackoverflowers very fresh one!) under the section Perl is dead infact Perl was given for dead many times but will probably dance on many other language graves.. ;=)

    Finally only Perl has perlmonks.org !!



    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.

      Nice post! What it reminded me of is that it has the best Unit Testing platform of any language I have ever used. This, to me, is one of the most important aspects that I completely overlooked.

      "...no good to write hardware driver..."

      Yes we can, less or more ;-)

      «The Crux of the Biscuit is the Apostrophe»

      perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

      Thank you so very much dear sir, your link to the Modern Perl file is actually all I needed! wow quite the help this thread turned out to be! Thanks again.
Re: Some Help for a Report About Perl (updated)
by stevieb (Canon) on Nov 01, 2017 at 19:00 UTC

    Here are a few points off the top of my head. Most or all are opinion only, with perhaps little or nothing factual backing them up:

    • it's open source and free, so no cost here
    • Perl developers are in large decline since its hayday, so the cost of maintaining existing codebases or new code projects may/will be higher in this regard
    • it will be much more difficult finding quality Perl programmers than it may other more cute/fad languages (Python etc). That said, Perl devs are Perl devs... most of the highly experienced ones don't jump from fad to fad, doing only a couple years in between moves (when they do move, most stick with Perl on the side)
    • Perl is partially based on the C language, so experienced C devs can pick up Perl quite quickly
    • Perl is a Do What I Mean language
    • Perl's main slogan is TIMTOWTDI (There Is More Than One Way To Do It), meaning that it's one of the most flexible languages out there (at least all the ones that I'm fluent or partially fluent in)
    • The, or one of the largest online databases of free, Open Source modules all in a single location, makes installing and using new APIs/functionality so simple even your grandma (or your GrandFather) could do it (CPAN)
    • it's Perl, it's the best language ever written!
    • it was designed by an expert linguistic, so the language is exceptionally easy to understand flow

    About to start a meeting, so that's all I've got for now.

    update: Added GrandFather in there, because, you know, he's a real edumicator here, and thought it fit (while replacing a brake line on one of my trucks of all things :)

      > other more cute/fad languages (Python etc).
      Oh, that reads as weird name-calling there. Python was first released in 1991; Perl in 1987 - it's hard to believe that either can really be referred to as a "fad language" any more. Your point about the difficulty of hiring experience Perl programmers is fair, but you dilute it a bit here.
Re: Some Help for a Report About Perl
by eyepopslikeamosquito (Chancellor) on Nov 01, 2017 at 21:55 UTC
Re: Some Help for a Report About Perl
by BillKSmith (Prior) on Nov 01, 2017 at 20:09 UTC
    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

      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.

        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.

Re: Some Help for a Report About Perl
by soonix (Abbot) on Nov 02, 2017 at 06:37 UTC
    One distinguishing trait of Perl (I think this is unique in programming languages) is that Perl has context.
    Upon my first encounter with Perl (coming from languages with "context-free" grammars) I thought this were a design flaw, but it is intentional - Perl is designed after natural languages - and some of the advantages are described by chromatic in his book.
    The linked chapter also contains information on other points that make Perl stand out.

      Agreed! As per the quotes below. :)

      Pragmatics is a subfield of linguistics and semiotics that studies the ways in which context contributes to meaning

      -- Pragmatics (wikipedia)

      Neither is the soul of Perl, which rests in the realm of pragmatics

      -- Linguist Larry Wall (aka TimToady) in Re^2: What's wrong with Perl 6?

      Perl has further been described as an "OO language", where "OO" means, not "object-oriented", but "operator-oriented" -- as per the classic Periodic Table of the Operators. Note that Perl can easily support many more operators than most conventional programming languages because alphabetic operators in Perl (e.g. lt) are easily distinguished from variable names because variables must start with a sigil (e.g. $ or @ or %).

Re: Some Help for a Report About Perl
by eyepopslikeamosquito (Chancellor) on Nov 02, 2017 at 08:30 UTC

    Maintainability is the nebulous measurement of how easy it is to understand and modify a program. Write some code. Come back to it in six months (or six days). How long does it take you to find and fix a bug or add a feature? That's maintainability.

    Maintainability doesn't measure whether you have to look up the syntax for a builtin or a library function. It doesn't measure how someone who has never programmed before will or won't read your code. Assume you're talking to a competent programmer who understands the problem you're trying to solve. How much work does she have to put in to understand your code? What problems will she face in doing so?

    -- chromatic in Modern Perl ("Style and Efficacy" section)

    Oh, one more thing. Don't fall for the old chestnut that "Python is more readable than Perl". Or that "Perl looks like line noise". Instead, remind anyone who makes such a claim that Russian is "unreadable" if you don't know Russian. Then further challenge them to explain how Python's magical powers of readability ensures that they:

    • Make sound domain abstractions.
    • Decompose their programs wisely into highly cohesive, loosely coupled modules.
    • Choose descriptive, explanatory, consistent and regular names.
    • Write useful comments.
    • Minimize the exposure of implementation details.
    • Avoid duplication (DRY).
    • Don't use magic numbers in their code.
    • Create interfaces that are: consistent; easy to use correctly; hard to use incorrectly; easy to read, maintain and extend; clearly documented; appropriate to audience.
    • Write components that are testable in isolation.
    • Establish a rational error handling policy and follow it strictly.

    That is, "readability" (whatever that means) is far less important than "maintainability" -- so that programmers who know the language can come to the code later in its life and understand its construction and intentions and change it comfortably and confidently. And writing "maintainable" Perl is just as easy as writing "maintainable" Python.

      Quite so. It is always worth quoting from Ed Post:

      the determined Real Programmer can write FORTRAN programs in any language.

      I have seen this truism made real in more than one language as no doubt has everyone else who has been in the industry long enough. Thankfully there is not so much Fortranish Perl out there - it's probably the TIMTOWTDI which keeps them away.

Re: Some Help for a Report About Perl
by eyepopslikeamosquito (Chancellor) on Nov 04, 2017 at 00:38 UTC
Re: Some Help for a Report About Perl
by ww (Archbishop) on Nov 02, 2017 at 22:00 UTC

    As a latecomer to this party, I'm surprised that no one has mentioned this fact:

    Perl has a cadre -- a large one -- of folk who really know the languaqe, and cheerfully share their knowledge without trolling newcomers.
    viz: PM!
    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1202542]
Approved by davies
Front-paged by Discipulus
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2019-11-16 00:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (85 votes). Check out past polls.

    Notices?