Slashdot Mirror


Perl Turns 25

Several readers sent word that the Perl programming language turned 25 today. In his commemorative post at the Perl Foundation's website, mdk wrote, "So what does the future hold for Perl? Well I don't have a crystal ball but I cannot see the language fading from usage in the next quarter century, the truth of the matter is that even though there are languages that can do some of the things that Perl does, some of them do some things better, others do things Perl wasn't designed for, there is no language that has been designed to do the things that Perl is very good at doing. No language in the current scripting languages seems to have the flexibility, maturity and extensibility of Perl. The main power of Perl has always been its ability to quickly adapt, and be adapted, to suit purposes. ... The greatest challenges we will face for Perl is a shifting end-user base that will become more reliant on devices that are feature focused but crippled in application choice, the rise in mobile devices will continue and Perl will need to evolve to work with that. A better challenge for us to face would be the integration with electronically aware, and connected devices and systems, the apocryphal internet of things, in this Perl could be a powerful tool. I also believe that the more we see a divergence of language uses in the other scripting languages the more they will face issues in their core designs, issues that Perl avoids due to its malleable nature, what some believe is the crippling factor for Perl is likely to be its saving grace as it has the power and flexibility to cope with the shifting goalposts of an increasingly technologically reliant world."

64 of 263 comments (clear)

  1. Recent convert by DCFusor · · Score: 5, Interesting

    I recently became a fan of perl as my goals changed towards things it excels at - sticking together big other functionalities easily.

    --
    Why guess when you can know? Measure!
    1. Re:Recent convert by vlm · · Score: 5, Insightful

      AKA I'm a CPAN programmer not a Perl programmer. Works for me! Wake me when another language has the depth of CPAN. I might switch, then. Maybe.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    2. Re:Recent convert by DCFusor · · Score: 5, Interesting

      Yup. Me too. It's just awesome to be able to get stuff from CPAN with about the right "chunkiness" and documentation vs say trying to learn some huge monolithic library. Better yet - those cool modules often "accidnetally" document other things, like say, Gnuplot, so you can roll your own specialized versions easier than trying to understand the "native language" dox written by someone who didn't code in some other language, then translated by another non-programmer. And I can't believe I got first post.

      --
      Why guess when you can know? Measure!
    3. Re:Recent convert by Anonymous Coward · · Score: 2, Informative

      there is, it is called "CPAN+Gems+PyPi+Maven" ... amazing stuff out there if you're agnostic. Rubyists, in particular, seem to write amazing tools. Chef and Vagrant are two of my faves.

      However, I still don't recommend you use Node.js.

    4. Re:Recent convert by Anonymous Coward · · Score: 3, Informative

      RubyGems is very expansive, but the quality of the modules that rubyists write is atrocious. The language is such a poor performer (spend 30% of the time doing GC, oh but don't worry better GC is in the next version, oh wait the next version, nm the next version), and the whole Rails community is built around absurd bloat: nobody seems to care/notice that their gems are poorly implemented for anything other than scraping something together.

    5. Re:Recent convert by thetoadwarrior · · Score: 2, Interesting

      It's a great language actually. Instead of people moaning that people write shit perl (like any other language), why no learn to do it right and enjoy it. CPAN of course is a tremendous resource but even on it's own it's not hard at all to write or understand and on the off chance you see something you don't understand, perldoc will almost certainly cover and well because that's another thing that Perl has (along with Python) that many languages lack and that is exceptional documentation.

    6. Re:Recent convert by thetoadwarrior · · Score: 2

      CPAN has some of the highest quality compared to other repos (especially compared to javascript), it has test stats for dependencies, quick access to view the source without downloading, documentation and just about any other info you want. Pypi is great for finding things and installing but supporting information is lacking. Maven I can't comment on but Ruby suffers from the same sort of problems that other brogrammer languages suffering from (more variety in quality and a lack of documentation).

    7. Re:Recent convert by gottahavea · · Score: 2

      Yeah, me too. About 6 years ago (we can call that 'recent' from a Perl perspective can't we?).

      I'm a programmer that became a sysadmin. Perl is there, right down the pipe: shell based tools, connect to whatever DB you want, publish data via web applications, munge text data however you want ... This is the schtuff that I need, regularly. And wherever I'm moving CPAN is there. I can do it on *NIX, I can do it on *doze, just code up my little bits and get it done.

      Perl wins by the power of applicability. Yes, python can do many if not all of the above, and I recommend python for people learning to program. But I'm an old *NIX guy, and after a little study (required for any new language) it is 'hand in glove'.

      As for 'cats on keyboards' and other illegibility assertions: you can do that in any language. Write req specs, and design docs, even if brief, and remember that there are two programmers in every project: you and you in 12 months. Comments in code are like the units in data; contextual meaning.

      My heartfelt thanks to L Wall and the perl community, everywhere. Long may we be able to write what we want, where we want, how we want !!

      Happy birthday Perl :-D

  2. Perl Turns 25... by Frosty+Piss · · Score: 5, Insightful

    ...And is sexier than ever.

    --
    If you want news from today, you have to come back tomorrow.
  3. I used it. Once. by Tsingi · · Score: 5, Interesting

    I wrote an app in Perl once. It was the only language that I could get to reliably connect to MSSQL from Linux.

    It was fun to write, but I go back and look at the code now and it looks like Greek.

    On the upside it's been running for over 5 years and having no problems at all.

  4. Perl where are you tonight by Wansu · · Score: 3, Funny

    Perl where are you tonight
    how can I now run scripts on my own
    I searched the filesystem
    even looked in slash sbin
    They rm'd the sym link and pffft you wuz gone

    --
    Wansu, th' chinese sailor
    1. Re:Perl where are you tonight by Trailer+Trash · · Score: 2

      In case you need the tune:

      http://www.youtube.com/watch?v=EpNJuS3b0So

  5. Web Server development by Runesabre · · Score: 3, Insightful

    I remember when Perl was the workhouse behind all custom web server development. One of the few times I had "fun" writing code. Such a cryptic looking language that made perfect sense the moments you are writing it and completely alien days later.

    --
    Runesabre
    Enspira Online
    1. Re:Web Server development by Frequency+Domain · · Score: 3, Funny

      It always struck me as one of the poster children of "write-only" languages, right up there with APL.

    2. Re:Web Server development by Anonymous Coward · · Score: 5, Insightful

      Perl is write-only in the hands of stupid hacks. Oh wait, that's any language.

    3. Re:Web Server development by Frequency+Domain · · Score: 5, Funny

      A friend was editing a perl program when his cat walked across the keyboard. It took him a while to figure out which parts were written by the cat. That's when I decided to avoid perl.

    4. Re:Web Server development by dotgain · · Score: 5, Insightful

      Your friend should look into revision control software and possibly getting the cat his own terminal. This way the cat's contributions can be easily tracked.

    5. Re:Web Server development by gorzek · · Score: 2

      You guys should be glad you don't write MUMPS code.

    6. Re:Web Server development by Coryoth · · Score: 2

      There is nothing that requires that Perl code be write-only.

      No, there isn't ... but there's nothing that encourages it either. And perl has a elatively high congitive load in terms of all the many subtle features and idioms that you need to keep track of. If you're reading code that only uses a subset of idioms and features that you're comfortable with it's fine, but it is relatively easy to end up outside your comfort zone with other people's code unless you are deeply invested in the language. In this way it is much like C++.

      In practice however a lot of Perl's reputation for unreadability is historical, and cultural. Back when Perl was more popular there was very much a culture of "neat hacks", JAPHs and perl golf. That meant that a lot of Perl code you saw in examples was often cryptic, or revelled in terse complexity.

      These days I think Haskell has taken the crown for the culture that produces terse, complex and cryptic code. There's nothing in Haskell that means it has to be hard to read, but a culture of showing off with terseness has developed and ...

  6. Why perl? by Frequency+Domain · · Score: 4, Interesting

    What can perl do that newer languages such as python and ruby can't do, and do more readably/maintainably?

    I understand about path dependence and sunk costs, which is why we still have COBOL, I'm asking about language features that are unique to perl.

    1. Re:Why perl? by miletus · · Score: 5, Interesting

      How much of readability is the fault of the language vs the developer? Cut-n-paste coding is the bane of any language.

      As a perl programmer, I sometimes ask, what can python or ruby do that perl can't?

      MVC web framework like Rails or Django? Catalyst, Mojolicious, etc. PSGI has taken a lot of pain out of deployment of apps.

      Good, modern object system? Moose.

      GUI stuff? There's Wx and Qt interfaces.

      OK, embedding C looks much easier in python, but I've never needed that.

      If all the CPAN stuff would just work with other languages, I'd be more willing to switch. Javascript seems to be where all the web stuff is heading anyway.

    2. Re:Why perl? by Maximum+Prophet · · Score: 2

      Mostly inertia and a great set of libraries in CPAN.

      There's even a Perl library that will hold your C code, compile it when needed, and make it easy to use.

      Perl just plain works and plays well with others. Compare and contrast that with Java or Smalltalk.

      --
      All ideas^H^H^H^H^Hprocesses in this post are Patent Pending. (as well as the process of patenting all postings)
    3. Re:Why perl? by preaction · · Score: 3, Interesting

      Surprisingly, embedding C++ in Perl is easier than embedding C. Of course, that's just my opinion, there aren't a lot of docs on the C++ topic, and I am one of the few Perl programmers who actually enjoy C++.

      The Parrot VM http://www.parrot.org/ is supposed to be for dynamic languages what the CLR and JVM are for Microsoft and Java respectively. If it ever makes it to prime time, then you could use your CPAN module with Ruby, or vice-versa.

    4. Re:Why perl? by Anonymous Coward · · Score: 2, Informative

      How much of readability is the fault of the language vs the developer?

      When the language's answer to new features is to add a new operator instead of a library/function call, it's the fault of the the language. That Perl now has nearly 300 operators, that is a language smell.

      OK, embedding C looks much easier in python, but I've never needed that.

      Understatement of a lifetime. I've had to expose C++ apis to Perl, Python, Java & C#. Hands down the worst, by several orders of magnitude, was Perl. XS should be held in front of the world for judgement as the worst abomination and abuse of the C preprocessor known to development kind. That XS is held to be the best means of expose C to Perl is an even greater condemnation. By contrast, Python's C API is clear, well documented, and for the most part, any preprocessor macros involved behave and look like well-defined functions. JNI, I've only used it a little bit, so I won't pass much judgement, but the API was fairly clear and easy to understand. C#, the same way. C# has the added bonus that if you're interfacing with a pure C DLL, you can do it with DLLImport attributes. The gotcha there is just making sure you get the function signatures and marshalling correct.

    5. Re:Why perl? by dotgain · · Score: 3, Informative

      It's worth noting that Larry Wall won the IOCCC - twice. (I don't say this to support the GP's remark, more to attest to Larry Wall's awesomeness)

    6. Re:Why perl? by Thud457 · · Score: 3, Funny

      Larry Wall won the IOCCC - twice.

      That just makes him incomprehensible in two languages.

      --

      the preceding comment is my own and in no way reflects the opinion of the Joint Chiefs of Staff

    7. Re:Why perl? by narcc · · Score: 4, Informative

      No one cares about ruby. It's a dying little niche language. It had a good run, but that's all in the past now. To me, ruby never really felt complete. (It didn't even get a step method to its range class until 1.8.7) There was always some absurd limitation you had to work around or some needlessly obscure feature or rule to learn before you can do something obvious in just about every other language (What's up with things like this? 10.times { |i| puts i } madness!)

      Python, well, python enjoys some popularity, but I just don't think it's likely to hang-on like perl. Probably because of the whitespace issue and the big 2.x 3.x split. Perl filled a particular niche really well, and was a good fill-in in a few others (remember when it powered your website's counter and guestbook?). Python never really found a home as there isn't any particular area where it really stands out -- or is even arguably a good fit. You'll find a lot of "it can be used for ..." but not a lot of "It's really great for ..."

      As for readability, well, I can't say that it's a terribly readable language. I get that everyone is forced to indent their code (apparently, the whole world forgot about pretty printers) but that's not all there is to readability. Neither is readability all there is to maintainability. (You could even argue that the whitespace rules actually hurt readability, as it takes away otherwise helpful cues.)

      Let's not forget that you don't have to write illegible perl code. Really, it's not required!

      COBOL's staying power was due to much more than "sunk costs". It was, and still remains, the best tool for the job. You'll find tons of failed COBOL to Java conversion projects from the late 1990's as a testament to that. It's really hard to beat COBOL on performance and even harder to find a language that's as easy to read and maintain. (Not that there isn't lots of room for improvement. It was designed to be readable, however, and it shows.) In short: It's easy to learn, easy to read and maintain, and lightning fast.

      Anyhow, to answer your question: Manipulating strings is a strength that is not shared by many other languages to any significant degree, and this makes it a great fit for a broad range of applications to which python and ruby just aren't as well suited. (Working with strings in python 2.x is terrible -- even just outputting them can be troublesome due to the bizarre default behavior of 'print'. This has improved, but not much, in 3.x) I would argue that PHP is popular due in no small part to that as well (I've always thought of it as a simpler version of perl. A related note: PHP was originally written in perl.)

    8. Re:Why perl? by bill_mcgonigle · · Score: 3, Informative

      Couldn't it? Would it be possible, at least in theory, to compile CPAN modules to a binary format that could be linked to other programming languages? Is there any reason that CPAN couldn't be turned into something more like a shared library?

      Yes, this is part of the perl6 effort. There are ports of all the other scripting languages to the ParrotVM being written for perl6. Once that's worked out you can write a module in Ruby, run it from Python - it doesn't matter. Use the best tool for the job (which is often the one you're most comfortable with).

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    9. Re:Why perl? by gorzek · · Score: 2

      I used to use perl as my "glue" language, too, until I got into python. Python works just as well in most cases, and usually leaves you with much more readable code. People who haven't used python before can usually figure out what some code is doing just by reading it. With perl? Good luck.

    10. Re:Why perl? by gorzek · · Score: 2

      People are still harping about this? Get over it. Python doesn't care how you do your indentation, as long as you do it in a consistent way. You also aren't wasting lines putting curly braces on everything. And you barely even have to worry about it if you're using any kind of python-supporting code editor for it. I'm not even talking about a full IDE. Even IDLE alone will do the job.

    11. Re:Why perl? by CaptSlaq · · Score: 2

      Larry Wall won the IOCCC - twice.

      That just makes him incomprehensible in two languages.

      Three, if you include English. If only I could be that incomprehensible...

    12. Re:Why perl? by narcc · · Score: 2

      but most Perl "developers" are scripters, not programmers

      This is, quite possibly, the stupidest thing I've ever read -- and I've been known to read the comments section on World Net Daily articles.

    13. Re:Why perl? by VortexCortex · · Score: 2

      Larry Wall won the IOCCC - twice.

      That just makes him incomprehensible in two languages.

      Three, if you include English. If only I could be that incomprehensible...

      You've got a good start. You don't "include" English; You: use English; in Perl.

  7. And here is the birthday cake by perl6geek · · Score: 4, Informative
  8. Re:Python, please by smittyoneeach · · Score: 2

    if __name__=="__main__",
    you'll get your turn, Guido.

    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  9. Re:What's with the camel? by smittyoneeach · · Score: 2
    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  10. libraries first by bzipitidoo · · Score: 2

    When considering a new project, I look first for libraries I want to use. CPAN has the most commonly used ones, but get a little obscure, and you're out of luck. For instance, CPAN has OpenGL, but not OpenSceneGraph. Then I find out what languages interface with them. It quickly narrows down until maybe one language is left, and most often that language is C/C++. Sometimes no languages are left, and then I have to decide if I want to go through the pain of linking multiple languages, or search for more libraries. I like Perl's data types and regular expressions, but the pain of interfacing with a C library is greater than the convenience of not having to hack up custom hash functions and not bother with dynamic memory management. At least there's PCRE.

    Perl 6 is supposed to address this issue. Seamless interfacing with any C/C++ libraries. If it works, would make a lot of CPAN redundant. Been waiting for Perl 6 for years now.

    --
    Intellectual Property is a monopolistic, selfish, and defective concept. It is "tyranny over the mind of man"
    1. Re:libraries first by skids · · Score: 2

      Been waiting for Perl 6 for years now.

      There's enough of it working now to start toying around. The "NativeCall" interface got to draft standard status recently, and works, mostly. Lack of many C ("native") data types will be a point of pain for some time to come, though.

    2. Re:libraries first by jandrese · · Score: 2

      Perl 6 has the worst case of second system effect I've ever seen. They said at the outset that Perl 6 was going to be a major rewrite, but I never expected to still be using Perl 5 in 2013. It's a shame too because Perl has some definite rough edges, especially with complex data types and writing object oriented code. The complex data type thing is a big one, most programmers really struggle with how to define a hash of references to arrays or anything like that, and the syntax for accessing or updating said objects quickly becomes nightmarish.

      --

      I read the internet for the articles.
    3. Re:libraries first by FacePlant · · Score: 3, Insightful

      Are you using 5.16.2?
      Are you using Moose/Mouse/Moo for complex data types and/or object oriented programming.?

      Perl is alive and well.

      If you think of 5 as being a syntax identifier, then you might be pleased to see all of the development that's gone on since Perl 4 gave way to Perl 5.

      It sounds a little bit like you're complaining that Perl's development has not followed your idea of semantic version numbering.

      --
      My Heart Is A Flower
  11. Perl 6? by kriston · · Score: 3, Insightful

    Okay, so let's have a roll call of those of us using Perl 6 in production.

    Hands?

    Anybody?

    --

    Kriston

  12. Re:hmmm by preaction · · Score: 3, Informative

    As a Perl master, I agree with your perspective: Perl is the UNIX philosophy taken past its logical conclusion. It is more logical than shell scripts, more terse than C, greater than both for the everyday tasks that befall a serious computer user (and absolutely essential for a UNIX administrator).

  13. Re:I used it. Once. by Hatta · · Score: 2, Interesting

    Sounds like Perl. Powerful, accessible to a complete beginner, reliable, and practically unmodifiable once written.

    --
    Give me Classic Slashdot or give me death!
  14. Re:What's with the camel? by larry+bagina · · Score: 2

    a camel is horse designed by committee.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  15. Advantages of Perl by Animats · · Score: 2
    • Better syntax than Bourne shell scripts.
    • Preinstalled on most servers.
    • Programs from 1998 still run. (Unlike Python, where the Little Tin God keeps making incompatible changes.)
    • The CPAN library has some quality control and maintenance.
    • No vendor can make it go away.
    • Fast regular expression processing.
    • Closures! Although most Perl programmers don't know that.

    The syntax is unreadable, of course. And Perl 6 seems to have been rejected by the market. Still, it's a vast improvement over shell scripts.

    1. Re:Advantages of Perl by Maximum+Prophet · · Score: 2

      That, I think is the key to why Perl is still around.

      Shell scripts are quick and easy, they work and play well with others, but they quickly get unmaintainable after a page or two.

      Perl has local variables, real functions, and it also works and plays well with others.

      You really can do 90+% of everything you might want to do in Perl. Add in C code if you need something to be very fast, and you're up to 95+%. Well written Perl is no less readable than any other computer language, and more readable than most.

      --
      All ideas^H^H^H^H^Hprocesses in this post are Patent Pending. (as well as the process of patenting all postings)
    2. Re:Advantages of Perl by greg1104 · · Score: 2, Insightful

      Programs from 1998 still run because the language has been stagnant ever since. Python breaks because it actually improves sometimes. "The main power of Perl has always been its ability to quickly adapt"...seriously? Perl 6 has been stuck in R&D hell for a dozen years now. Even the Duke Nukem Forever team is starting to feel awkward about how long it's taking.

    3. Re:Advantages of Perl by dbIII · · Score: 2

      I was going to dust off what little I knew about python to do some trivial selection boxes that would set environment variables, but then I just added "zenity" to bash and it did the job very well in a very short script.

    4. Re:Advantages of Perl by Mjlner · · Score: 2

      Programs from 1998 still run because the language has been stagnant ever since.

      You really have don't know anything about Perl, do you? To suggest that Perl has been stagnant from 1998 (v. 5.005) until now (v. 5.16.2) is ridiculuous. The difference is immense. That doesn't mean that backwards compatibility needs to break. You just don't know Perl or its evolution.

          Python breaks because it actually improves sometimes. "The main power of Perl has always been its ability to quickly adapt"...seriously? Perl 6 has been stuck in R&D hell for a dozen years now. Even the Duke Nukem Forever team is starting to feel awkward about how long it's taking.

      Lessee.... Python 3.0 came out 4 years ago. Still, 2.7 is the one installed by default across the board. Some distros (e.g. latest Red Hat) are still stuck on 2.6. Apparently, most people can do without the improvements in Python 3.0-3.3.

      And Perl 6 is another language altogether. Perl 5 will continue to evolve long after the Perl 6 becomes mainstream. I think Larry Wall made a big mistake in using the same name, honestly. But still, you just don't know Perl.

      --
      Lemon curry???
  16. Perl is expressive by Okian+Warrior · · Score: 2

    Perl's strength is that it's expressive. It's not a language which is easy to learn or which generates heavily optimized code.

    In the demo phase, you're not really worried about performance. The goal is to have something working as quickly as possible, and not worry too much about how fast it runs, or how much memory it takes. Overspec your demo system for the time being (ie - make it really fast and install lots of memory), and once you have a reasonable interface go back and recode it in a simpler language which can be more easily optimized.

    Languages which are simple to learn (c++, for example) are generally not very expressive. You end up wasting tons of time debugging issues of memory allocation, library interface details, and datatype conversion.

    Languages which are expressive are a little harder to learn, but any individual line in the expressive language does a lot more. Since you are writing fewer lines, and since the fewer lines do more, you end up making programs more easily and in less time.

    Yes, the programs will execute a little slower, but as mentioned, this is not important in the demo stage. Your productivity will be much higher.

    And there are lots of places where performance simply doesn't matter. Scripts usually fall into this category.

    Perl was written by a linguist, not an engineer. As such, it's harder to learn (it's got tons more keywords and context), but once you get the hang of it it's much more expressive. The following single line:

    @Lines = sort { $a->{Name} cmp $b->{Name} } @Lines;

    unfolds into several lines of C++, plus a subroutine definition with datatype definitions. The following line:

    @Files = ;

    can be implemented using one of over a dozen possible library calls in C++, but is builtin in perl. You don't have to look up the library call interface specific to your system.

  17. Re:I used it. Once. by readin · · Score: 4, Insightful

    What I found in using Perl was that no two Perl programmers could read each others code. Much of the expressiveness and versatility that people talk about comes at the expense of a huge amount of syntax and the ability of the language to assume values (like $_ instead of requiring them to be explicit). What happens in practice is people learn a subset of syntax which is large enough to do what they need to do and it often isn't the same subset that someone else learned. And when reading someone else's code, it can be very difficult to look things up because it often isn't even clear what the syntax is (in part because so much gets assumed).

    When the boss hands me a flat text file with 50,000 lines in some random format that needs to be parsed and loaded into the database, I dust off my Perl book and write a short application to read each line and spit out SQL. I don't need the safety of Java or the byte processing of C. I don't need to handle every possible exception that could be thrown when opening a file. I don't need a GUI. I just need to open a file, read a line of text, use some regular expressions, do some tokenizing, and spit out more text into a separate file. Perl is fantastic for that. But I don't find much other use for Perl.

    --
    I often don't like the choices people make, but I like the fact that people make choices. That's why I'm a conservative.
  18. Moose -> Mouse -> Moo -> Mo by oneiros27 · · Score: 2

    That's why there's Mouse. And if that's still too large for you, there's Moo. And when even that's still to large, there's Mo

    And you can select which one has the features you need, without the bits you don't care about ... but they've all got basically the same general API, so you can change it up as needed.

    --
    Build it, and they will come^Hplain.
  19. Re:I used it. Once. by CaptSlaq · · Score: 4, Insightful

    And, in python: list = [1, 1, 2, 2, 3, 3, 4, 4, ] unique = set(list)

    Which is more readable?

    use List::MoreUtils qw(uniq);

    my @words = qw(foo bar baz foo zorg baz);
    my @unique_words = uniq @words;

    What was that about readability?

  20. Re:I used it. Once. by bill_mcgonigle · · Score: 3, Insightful

    What I found in using Perl was that no two Perl programmers could read each others code.

    That's silly. I'm just a medium-grade Perl jockey and I read and understand other projects' code. I find bugs and submit patches.

    Perl doesn't force good style on you, but if you follow the guides of Perl Best Practices and check yourslelf with Perl Critic you're going to produce code that most programmers can follow.

    Some people aren't comfortable with 'enough rope to hang yourself', which is fine. Others think that forced indentation is the answer to good code style (I think semantic analysis is better). There are lots of options.

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  21. Re:I used it. Once. by lennier · · Score: 2

    a good example of why perl is awesome

    The interfacing Linux and MSSQL, the running for five years, or the looking like Greek?

    --
    You are not a brain: http://books.google.com/books?id=2oV61CeDx-YC
  22. Re:What's with the camel? by lennier · · Score: 2

    a camel is horse designed by committee.

    A committee of hard-core desert survivalists who wanted an animal made of pure awesome.

    --
    You are not a brain: http://books.google.com/books?id=2oV61CeDx-YC
  23. Re:Why perl? Because .... by xanthos · · Score: 2

    There is more than one way to do it.

    Perl can pretty much integrate anything with anything. Hardware or Software.

    It is the Duct tape of the interwebs.

    It is a swiss army chainsaw.

    And yes,it can be nearly impossible to decipher what the code is doing, Oh, but the moment of enlightenment you have when you do figure out an obscure but elegant piece of code.

    That, my friend, is "Why Perl?".

    -Xanthos

    --
    Average Intelligence is a Scary Thing
  24. Re:Difficult to understand? by ThePhilips · · Score: 2

    I simply was never able to form a mental model of how to use it correctly.

    Perl is a multi-paradigm language. It doesn't bundle or insist on a particular model - you are free to use whatever model you want.

    --
    All hope abandon ye who enter here.
  25. Perl versis c++ by Okian+Warrior · · Score: 3

    Languages which are simple to learn (c++, for example)

    WHAT?

    Ahem. "Languages which are simple to learn (c++, for example)".

    Perl has lots more reserved words than c++.
            (Examples: "say", "not", "and", "open")

    Perl has lots more operators than c++
            (Example: "//" is an operator in perl. So is "<=>", "+/*", "..", and "eq").
            (See if you can understand the flip flop operator on first reading.)

    Perl has several contexts, and the meaning of an operator or function is context dependent.
            (Example contexts: "scalar", "list", "null", "string")
            (Example differences: Saying "$i = sort @array" has a completely different meaning from "@i = sort @array")

    Perl distinguishes a variable from its value.
            (Example: $i = 12; followed by $i = "twelve". The same variable, points to one of two values in memory. C++ binds the variable to the memory location, perl does not. Programmers have trouble wrapping their mind around this.)

    Perl references are not pointers (but have some similarities). C++ programmers have a hard time with this also.

    Perl has all the overloading and class syntax found in c++.

    Perl doesn't have a precompiler.

  26. Re:Testing by chromatic · · Score: 2

    ... what does the much-vaunted CPAN contain within it that has unit tests?

    Any serious distribution on the CPAN has at least a decent test suite in its t/ directory. Everything uploaded to the CPAN gets run through the CPAN Testers service, often within minutes of the upload.

    search.cpan.org has over 3200 results for module names which contain the word "Test".

  27. Re:Moose - Mouse - Moo - Mo by dskoll · · Score: 2

    And you can select which one has the features you need, without the bits you don't care about

    In theory, yes. In practice, no, because sometimes a CPAN module will insist on one specific module. And woe betide you if you want to mix modules that use different OO bases.

    The mere existence of Moose, Mouse, Moo and Mo that purport to solve the same problem is an indication of a deeper underlying problem.

  28. Re:Duct tape of the web by FacePlant · · Score: 2

    > The majority's view of Perl seems to be stuck back in the 90s.

    The majority generally do not pay attention, and also hate it when their view of the universe is threatened by facts.

    Perl will continue to have it's place, as do Fortran, COBOL, etc. It wasn't my first language, and isn't my last, but it's still my bread and butter.
    Despite using it for 20 years, there are still some things that are idiomatic AWK for me. I'm sure it will be the same way with Perl, even after I've used Ruby or Python for a long time.

    --
    My Heart Is A Flower
  29. Re:I used it. Once. by hermitdev · · Score: 2

    The Python is still more readable. First, you had to import an extra library (which, ok, python is built upon libraries). But, what the FUCK does "qw" mean? One can guess, and only guess, for the context that it's some sort of means to delineate a list. my @whatthefuck = ....; considering that on a lot of perl you're going to see: my $whatthefuck = ...; and that the @ and $ variables are two different things... And, you may hear the argument that "those are namespaces". bullshit. they're not namespaces. C++, Java, C# & Python have namespaces. @/$ does not denote a namespace. Especially, given appropriate context, you can use one of the other to change how the variable is treated. That's a cast, not a namespace. Fact is, Perl is W.O.R.N. language: Write Once Read Never

  30. Reading each other's code? by Giftmacher · · Score: 2

    Lots of comments about being unable to read code authored by someone else (as usual), but who are these "professional perl coders"? I'd say I'm an intermediate perl programmer, and I've had no trouble reading my old code or anyone else's provided it's been written sensibly. Hell I've even been able to decipher some pretty Byzantine code when required.

    Perl isn't a language without faults, for example OO is not fun in perl. However, it mystifies me to see perl criticised for readability when the coder is, in no small part, responsible for making something decipherable. I've seen shocking code in several languages, where I work I know there's a particularly hairy example of cold fusion we're still struggling to tame... Diabolical use of in-line HTML, thousands of lines of code without so much as an attempt at basic formatting (no indents) etc, etc. It was written by a genius I'm told, but why they deserve that title when they weren't smart enough to write something we could maintain I'll never know.