Slashdot Mirror


Perl 6 Now by Scott Walters

Joseph Brenner writes "Every now and then, a beginning programmer asks if there's any point in learning to program in Perl 5, when Perl 6 is going to change everything soon. There are a number of answers to that: one is to point out that Perl 6 is still years away, another is to point out that it is promised that Perl 5 code will run under Perl 6 without modification (a module that begins with the traditional "package" statement is Perl 5 code; if it begins with the new "class," then it's Perl 6)." Read on for the rest of Brenner's review of Scott Walters' Programming in Perl 6 style using Perl 5, a book which answers that question a whole different way. Perl 6 Now author Scott Walters pages 379 publisher Apress rating 7 reviewer Joseph Brenner ISBN 1590593952 summary Programming in Perl 6 style using Perl 5

Scott Walters here pursues what might be thought of as the third answer: you can learn Perl 6 now and immediately begin writing programs in a "Perl6ish" sort of way, using appropriate CPAN modules that have been used to implement approximations of Perl 6 behavior: Perl6::Variables, Perl6::Export, Perl6::Contexts, autobox, Perl6::Classes, Switch, and so on.

There are many caveats about using these tricks in production code, however, and Scott Walters doesn't shy away from warning you about them (e.g. p.43 "Source filters are dangerous" where he discusses their increased start-up overhead and potential bugginess -- though he doesn't mention my own peeve which is that they're very confusing when you try and use the Perl debugger).

So possibly the book is not really quite so well suited to an actual beginner-- who probably should not be told about "use Switch 'Perl6'", but the device of spending the early stages of the book directed toward a beginning audience makes it a very useful review for people like myself who have been reading the Apocalypses, but don't remember every detail.

And on the other hand, the book includes some prominent early warnings about common gotchas that beginning programmers seem to be prone to -- e.g. using dynamically defined variables instead of just using hashes.

The standards for writing English in the Perl world are pretty high -- the core members of the Perl community have always cared a lot about clear writing, and it's arguably the world's best documented language (critics will no doubt add that it needs to be). Unfortunately, I can't say that Perl 6 Now quite lives up to this standard. This is a book that was written in a hurry, and it shows: hasty sentences and minor organizational problems abound (e.g. one or two items seem to be discussed in the wrong place; there are an awful lot of explicit forward references, and yet there's at least one place where something was used in an example before being discussed a few dozen pages later). But then in Scott Walters defense, this is certainly a book that needed to be written in a hurry, because its subject matter is such a moving target.

And where the book really shines is in its code examples: short, clear and to the point; the author repeatedly shows how something can be done in Perl 5 code and how it's expected to work in Perl 6. These examples are always clearly labeled "Perl 5" or "Perl 6" in the comments, so that the two can't be confused.

The subjects of some of the examples are pretty cool: e.g. he talks about using PDL ("Perl Data Language") to crunch audio data in MOD format, which I was completely unfamiliar with. A *.mod file essentially contains the "sheet music" for multiple parts (really, MIDI) plus sound samples that specify how notes will sound for each voice. This is discussed in Chapter 7, which is also the free sample chapter. I also liked random walking Arizona's highways as an example of Graph navigation (Chapter 8, p 159), and I appreciate the fact that he downplays inheritance in favor of delegation in his discussion of objects (Chapter 14, p. 262).

All in all, this book is a fun read for the Perl fanatic.

(Note: the title Perl 6 Now bears a strong resemblance to an emacs package I've been working on called perlnow.el, but there is no relation.)

You can purchase Programming in Perl 6 style using Perl 5 from bn.com; it's also available in eBook format (password protected PDF, using your email as password) for $15. Source code and and a sample chapter are available online: Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

366 comments

  1. Re:Perl 9 is already out... by Gunny101 · · Score: 2, Interesting

    It's interesting that books on Perl 6 are released when the Perl 6 is still in development. I understand modules for Perl 5 exist that can utlize some Perl 6 features, but still... Someone should release a book on Windows Vista now that a beta is out.

  2. PHP5! by Douglas+Simmons · · Score: 5, Funny

    I hate to be Jonny Raincloud, but pretty soon PHP will be able to do whatever perl does, if it's not there already. And anything that it can't do that perl can will be obsolete. So no, don't waste your time learning perl 6. Do the right thing and brush up on your PHP5. I got my site to print in any font I want the time AND date, powered by php, baby!

    1. Re:PHP5! by mrchaotica · · Score: 1

      Does PHP have the equivalent of CPAN?

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    2. Re:PHP5! by Seumas · · Score: 1

      Best troll ever.

    3. Re:PHP5! by Nuclear+Elephant · · Score: 4, Funny

      Does PHP have the equivalent of CPAN?

      Who would want a language that had its own mediocre congressional television station?

    4. Re:PHP5! by utopianfiat · · Score: 2, Interesting

      s/(1|2|3|4|5|6|7|8|9|0|one|two|three|four|five|six |seven|eight|nine|ten|eleven|twelve|thirteen|fourt een|fifteen|sixteen|seventeen|eighteen|nineteen|tw enty|thirty|forty|fifty|sixty|seventy|eighty|ninet y|hundred|thousand|million|billion|trillion)/<b>\1 </b>/g

      Look, I'm violating patents!

      --
      +5, Truth
    5. Re:PHP5! by PalmKiller · · Score: 1

      I am not sure this troll even knows what perl is. I suspect he thinks its just for web pages in cgi and the like, which is as far from the truth as it gets.

    6. Re:PHP5! by snearch · · Score: 1

      Obviously, you are an experttttt!

    7. Re:PHP5! by Spy+der+Mann · · Score: 2, Informative

      Does PHP have the equivalent of CPAN?

      Yes, it's called PEAR: The PHP Extension and Application Repository.

    8. Re:PHP5! by Anonymous Coward · · Score: 0

      way miss joke the to
      to the joke miss way

    9. Re:PHP5! by MrCopilot · · Score: 1
      I got my site to print in any font I want the time AND date, powered by php, baby!

      Ok, you got my click. Nice Layout, But the speed, oh god man, are you extolling the virtues of PHP with your private site, ON SLASHDOT? Maybe its just the effect of being posted here, but You scared me off PHP forever if your site is any indication of its speed. Because I realize you could be on a slow DSL or a Slow PC or Slashdotting, I am forced to withold my ASSessment, untill I check it again off PEEK hours.

      Yeah that's it, that's why I bookmarked it.

      BTW, It is customary to use the abbreviation NSFW when you post a link like this.

      --
      OSGGFG - Open Source Gamers Guide to Free Games
    10. Re:PHP5! by Anonymous Coward · · Score: 0

      you forgot the most important number ever, "eleventy1!"

    11. Re:PHP5! by jallen02 · · Score: 3, Insightful

      Pear only has a handful of modules compared to CPAN, in all fairness.

      Jeremy

    12. Re:PHP5! by Anonymous Coward · · Score: 0

      You shouldn't post something about his site's speed until you're sure it's not a slashdot beating! DUH!

    13. Re:PHP5! by sundru · · Score: 1

      Get a clue on what perl is capable of . Sheeeesh!!

    14. Re:PHP5! by w98 · · Score: 1

      surely you mean C-SPAN ?

    15. Re:PHP5! by Wieland · · Score: 1

      Don't you mean C-SPAN?

    16. Re:PHP5! by Anonymous Coward · · Score: 0

      This is insightful??? Do the mods even know the meaning of the word insightful? re: judging moderators - Never attribute to crack what you can attribute to sheer stupidity and ignorance.

    17. Re:PHP5! by Frank+T.+Lofaro+Jr. · · Score: 1

      Why are you reading and posting to Slashdot at work in the first place? :)

      --
      Just because it CAN be done, doesn't mean it should!
    18. Re:PHP5! by Momoru · · Score: 2, Funny

      BTW, It is customary to use the abbreviation NSFW when you post a link like this.

      I believe as the ass ambassador, he is entitled to diplomatic immunity in this case.

      At least I hope so since he is publishing so many copyrighted images illegally....

    19. Re:PHP5! by cloudmaster · · Score: 1

      PHP is more limited in scope, and many of the perl modules would be totally useless - so that should offset some of the difference. Sure, you can run PHP on the command line - if you're too slow to learn perl or python. Then again, many of the modules on CPAN are totally useless to perl programmers, too... :)

      Anyway, Pear has done most everything that I'd expect a module repository to do for me in my PHP use. With recent releases, pear is actually semi-useful, too! Tihs is unlike some previous releases, where pear wasn't installed by default, or was impossible to set up...

    20. Re:PHP5! by pAnkRat · · Score: 1

      It's is part of my job to stay informed about IT in general.

      If you read Slashdot the "right" way, you can get some very interesting insights and ideas.

      You can't imagine what I've seen on slashdot for the first time, which has become productive in the company I work for.

      - The linux vserver project http://linux-vserver.org/
      - subversion http://subversion.tigris.org/
      - svg (see previous story)
      - Phpcache http://www.php-accelerator.co.uk/
      - Ajax (I know it's mainly a buzzword at the moment but my current project already bennefits)

      And numerous discusions about security.

      See, slashdot is not my main source of information, but it leads to information.

      --
      we need an "-1 Plain wrong" moderation option!
    21. Re:PHP5! by jonadab · · Score: 1

      Perl? PHP? Who needs 'em? Firefox supports SVG now so why not just do everything in that?

      Sheesh.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    22. Re:PHP5! by holy+zarquon's+singi · · Score: 1

      Look&lt son ;/patronising>. PHP may be fine for some things, but for out and out management of data, as messy or as clean as you like, nothing beats perl. Unless it's a statistical programming language OK? Mind you, those cunts^H^H^H^H^H at NVIVO could make an effort and get off the microsoft juice too.

      --
      "...we should just trust our president in every decision that he makes and we should just support that." B.Spears 2003
    23. Re:PHP5! by gowen · · Score: 1
      Oh no. That just bolds it. This patent covers the novel, innovative... nay, genius...idea of putting the number in a box.
      s/(1|2|3|4|5|6|7|8|9|0|one|two|three|four|five|six |seven|eight|nine|ten|eleven|twelve|thirteen|fourt een|fifteen|sixteen|seventeen|eighteen|nineteen|tw enty|thirty|forty|fifty|sixty|seventy|eighty|ninet y|hundred|thousand|million|billion|trillion)/\\box ed{\1}/g
      would do it, in LaTeX, at least.
      --
      Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
    24. Re:PHP5! by xiopher · · Score: 0, Offtopic

      Johhnie Why don't you just learn both and be a better person allaround

      7680 MB Disk,192 GB Transfer,
      For JUST $15.95 per Month FOREVER

  3. Forward references by tcopeland · · Score: 1
    there are an awful lot of explicit forward references,
    Are these always bad? I've been having the same trouble with PMD Applied; when I'm in an earlier chapter babbling about the XPath rules it seems really convenient to say "and if you want to learn how it _really_ works, check chapter 9 for a nuts and bolts description of DocumentNavigator and AxisIterators and all that". But I hesitate to add notes like that because folks don't seem to like them. Seems handy at times, though...
    1. Re:Forward references by TrueJim · · Score: 1

      Backward references are always better than forward references. That's why in my FORTRAN days I often argued that we could replace GOTO statements very easily if we simply added a COMEFROM statement to the language instead:

        10 MOL = 42
                  DO 20 I = ID+1, X
                      X = H * 0.5
                      SUM = SUM + F(X)
        20 CONTINUE
                  IF (SUM .LT. 4.0) COME FROM 10

      See? Backward references are much clearer!

      --
      I hope that after I die the one word people use to describe me is "resurrected."
    2. Re:Forward references by doom · · Score: 1
      there are an awful lot of explicit forward references,
      Are these always bad? I've been having the same trouble
      Well no, of course they're not always bad, and they're certainly not always avoidable... no subject is easy to completely linearize the order of presentation, and even mapping one to a hierarchy can be pretty tricky. A lot of them can be pretty irritating/confusing though, and in general you try and minimize them where you can in technical writing.

      Have you heard Larry Wall's story about how he decided in what order to work on Perl6 design? He realized that when they wrote the Camel book they did their best to avoid forward references, which meant that he could do the same by thinking about Perl6 following along one chapter at a time in the Camel.

      (Funny, I've got moderator points today... I was tempted to avoid posting and use 'em to pound down anyone who didn't like my review, but none of the jerks seem to be out today.)

    3. Re:Forward references by tcopeland · · Score: 1

      > A lot of them can be pretty irritating

      True, yup, probably there's room for an occasional one or two. I've mostly avoided them so far...

      > he could do the same by thinking about Perl6

      That's a very interesting story! Very cool.

      > none of the jerks seem to be out today

      Either that or they're all off in the "politics" section...

    4. Re:Forward references by Anonymous Coward · · Score: 0

      Sounds like many of the other Perl books I've read. What's the big deal?

  4. Clear writing by Sweetshark · · Score: 4, Funny

    The standards for writing English in the Perl world are pretty high -- the core members of the Perl community have always cared a lot about clear writing
    Yeah, right. Why should one obfuscate English, Perl offers much more possibilities to do so.

    1. Re:Clear writing by fm6 · · Score: 1
      I wouldn't call that obfuscation. I'd call it a language that puts too much emphasis on clever and complicated idioms. It's designed by people with a good understanding of language, but are more concerned with having fun than with expressing themselves clearly.

      And that's what's wrong with the standard Perl books too. They don't resort to the nasty clunkspeak that's standard for bad technical writing. But neither do they write well. There are too many humorous asides, the material is not well-organized, and there's no real sense of audience. It's too damn creative, and thus very frustrating to read when you just want to sort out some technical detail or another.

    2. Re:Clear writing by crucini · · Score: 1

      That comment applies pretty well to the Camel book - which others are you thinking of?

      I think of the Camel as entertainment/digression/philosophy. If you want to sort out technical details, look in the man pages, with which Perl is plentifully provided. I haven't felt a need for Perl books in a long time.

  5. The author's last work was the most excellent... by Anonymous Coward · · Score: 1, Funny

    Duke Nukem: Forever Modder's Guide.

  6. Pointless Perl6 by amightywind · · Score: 0

    Perl5 has been wildly successful by any measure. Why? It successfully merged the best (and worse) of shell programming, C system programming, awk, sed, and even some Lisp through a baroque, yet familiar (to shell programmers at least) syntax. It is marvelously useful. But it is complete! There is nothing more to add! Leave it be and people will develop nice Perl libraries for the next 20 years. Perl 6 is pure vanity. Larry Wall would be much wiser to turn his attention to other areas.

    --
    an ill wind that blows no good
    1. Re:Pointless Perl6 by Lost+Found · · Score: 1

      Have you read up on Perl 6? I've done some very extensive reading, and I'd suggest you check out the wealth of new features and concepts before making such an outlandishly foolish claim.

      Then again, this is Slashdot, and I suppose this level of ignorance is the norm rather than the exception.

    2. Re:Pointless Perl6 by A+beautiful+mind · · Score: 3, Informative

      Please do not moderate parent up, because it's just a guess at most.

      Perl6 is actually built from user feedback, for the first time.

      From wikipedia: Larry Wall, the creator of Perl, has called Perl 6 "the community's rewrite of Perl", because he has based the changes largely on 361 "requests for comments" submitted by the Perl community in 2000. He is outlining these changes in a series of long essays, called Apocalypses, which are numbered to correspond to chapters in Programming Perl ("The Camel Book"). The current, unfinalized, specification of Perl 6 is encapsulated in design documents called Synopses, which are numbered to correspond to Apocalyses.

      Parent is NOT insightful.

      --
      It takes a man to suffer ignorance and smile
      Be yourself no matter what they say
    3. Re:Pointless Perl6 by amightywind · · Score: 1

      Have you read up on Perl 6? I've done some very extensive reading, and I'd suggest you check out the wealth of new features and concepts before making such an outlandishly foolish claim.

      Like you I read the Perl 6 updates when they come across the news sites. I have tried to wade through Larry Wall's obtuse bullshit. I stand by what I said. Perhaps you enjoy waiting years for vaporware to materialize. You must be a Hurd user. My guess is you will never see Perl 6. But I doubt whether Perl 6 will advance the state of the art of programming if it ever does arrive.

      --
      an ill wind that blows no good
    4. Re:Pointless Perl6 by Anonymous Coward · · Score: 1, Interesting
      Yeah, wouldn't it be cool if Larry focused on other cool applications like patch management, or news readers or usenet posting software.

      PS: for the uninformed; Larry did indeed write the leading products in those categories at the time(late 80s?)

    5. Re:Pointless Perl6 by rubycodez · · Score: 1

      I've written tons of perl 5.x code in my life, it's been a very useful and powerful tool, but five years already since RFCs, and will likely take another five to *design* this new language? Then how long to implement it on parrot vm? another three? user base is too big to make a committee. I'm thinking Perl 6 won't be too relevant or modern in 2013 AD

    6. Re:Pointless Perl6 by shotgunefx · · Score: 1

      I'd disagree. I've got some doubts about Perl6. That's for sure. But there are more than a few things out of this that are very practical and useful.

      Though I think I would have just preferred if they added continuations and what not, cleaned up the guts some too. Damian had a proposal for this I believe called Perl 5i

      --

      -William Shatner can be neither created nor destroyed.
    7. Re:Pointless Perl6 by w98 · · Score: 1
      Perhaps you enjoy waiting years for vaporware to materialize

      Redmond,WA expects us to ... Maybe Larry just took a page from Microsoft's book?

  7. Is there a point to Perl any more? by Call+Me+Black+Cloud · · Score: 0, Flamebait


    There are many other choices in scripting languages, some of which have come after Perl and presumably improve on Perl's weaknesses. Other than for working with existing code or as a matter of personal preference, are there good reasons to choose Perl over other languages for new development? I've really worked very little with scripting languages so I'm not up on all the strengths and features of each. Given all the jokes about Perl (e.g. it's a write-only language) and all the raves Python, Ruby, etc seem to generate, I guess I'm surprised at any article that doesn't state "Perl is dying."

    1. Re:Is there a point to Perl any more? by Lost+Found · · Score: 1

      Most of these languages borrowed heavily on Perl's ideas. Did you know PHP was once actually implemented in perl? It's not immediately obvious to the novice perl programmer, but the corners of the language that people often bitch about (like the OO syntax) actually allow tremendous flexibility, far surpassing the available alternatives (although, again, so-called 'competitors' have adopted a lot of Perl philosophy).

      Perl's useful for a huge variety of things... used heavily by people from the Genome project to Amazon.com.

      Looking over the Perl6 docs, I can tell the language is going to be a very vast step forward, well beyond Perl5 and all those still playing catch-up to Perl5.

    2. Re:Is there a point to Perl any more? by CDarklock · · Score: 4, Interesting

      I stopped using Perl over ten years ago, when I had a disagreement with Tom Christiansen and he seriously threatened to blacklist me from the Perl community if I didn't agree with him. I told him to go ahead, because I would simply never write Perl again. He laughed and told me to let him know how that went.

      Well, it went just fine. I haven't written a single line of Perl since that day, and I haven't missed it one bit.

      These days, with so many options available, I think Perl appeals to a certain kind of developer in much the same way Java does. You don't really NEED it, in the sense that many other things can do the same job... but it's a point of style. Java and Perl now serve primarily as focal points for very small and specific communities that otherwise wouldn't really exist in a coherent fashion, much like APL or Objective-C. Ruby is similar, and I don't really see it going mainstream. These sorts of niche technologies still do the job, and selecting one of them instead of a more "mainstream" language like PHP or C++ identifies you as a particular kind of person.

      --
      Microsoft cheerleader, blue flag waving, you got a problem with that?
    3. Re:Is there a point to Perl any more? by jericho4.0 · · Score: 2, Insightful
      Perl is 'hardcore' compared to python. More things to remember, more exceptions to rules, more than one way to do it. Very powerful, but can be intimidating.

      So, if you want a language for scripting 9in the sense that most people with little scripting experience think of it), you might want to avoid perl. If you want a language to elegantly encode brilliant ideas in a short space, go for it.

      --
      "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
    4. Re:Is there a point to Perl any more? by sundru · · Score: 1

      " small and specific communities" ???? I work in a fortune 20 company and almost everything runs on perl - datamining, ETL, Log processing. Some other small business networks i maintain runs shell/perl for almost all system configuration.

    5. Re:Is there a point to Perl any more? by Anonymous Coward · · Score: 0

      So what? I work at a mid-size company that writes everything in ColdFusion. You think that makes it good?

    6. Re:Is there a point to Perl any more? by ctr2sprt · · Score: 1
      There is a point to Perl, definitely. For fairly small and simple things, most people will use shell scripts. If you are filtering a lot of data, though, they tend to get painfully slow (because of their reliance on stuff like awk and sed). That's an excellent place to drop in Perl, which is really great at filtering lots of data. It's also a clearer language, believe it or not, for "super-scripts:" things which maybe started as shell scripts but evolved into small applications.

      I would say that Perl is far less useful for major applications than Python (my favorite) or other, "cleaner," languages. Perl's a full-fledged general-purpose language, so of course it can be used for major apps, but it's not as good for them. I think that's part of the reason CPAN is so huge and powerful: it comes from a recognition by Perl programmers that the language is at its best when your scripts are under a thousand lines. By using many small CPAN modules you can do some pretty complex stuff with a pretty small amount of code (code written by you, anyway).

      So a fuller answer to your question: I think Perl is becoming less important as other languages develop CPAN-like capabilities, but I don't ever see it going away. It will, at worst - or best, depending on your perspective - devolve to what it began life as: a powerful tool for writing nontrivial scripts.

    7. Re:Is there a point to Perl any more? by try_anything · · Score: 1

      Even as someone who abandoned Perl for Python, I suspect there is a point to Perl. I'm truly impressed by the concise power of Perl one-liners and text-manipulation scripts, and I made an earnest attempt to become a Perl user.

      Unfortunately, I only need scripting once every few months or weeks, which is longer than it takes me to forget all the little details that make Perl so rich and expressive. Python is much better for me: it only takes me a few minutes to start writing good code in Python, no matter how long it's been since the last time.

      My failure should give some idea of who can and should use Perl:

      1) People who need and use scripting every day or at least several days per week
      2) People who are much smarter than me :-)

      Seriously, Perl is a complex and sophisticated tool that rewards consistent commitment. You just can't half-ass it, or neglect your Perl skills and expect them to be there months later when you need them. For that, use Python.

    8. Re:Is there a point to Perl any more? by Anonymous Coward · · Score: 0

      Other languages strictly borrow from Perl if your knowledge of PLT only extends to Perl. Name competitors that adopt Perl's philosophy. Ruby? No. Python? No. PHP? PHP has been moving away from Perlisms for several releases now.

    9. Re:Is there a point to Perl any more? by brufleth · · Score: 1

      I work in engineering and have to analyze piles of data. I use perl every day to convert, filter, move around, and format data. It works better than Matlab for large files. I also use it to write large run files. In short I think perl is still useful for doing many simple scripting tasks. Many of the people on /. are looking at it more from the web developer view point. I've never even learned how to use perl for that purpose.

    10. Re:Is there a point to Perl any more? by shobadobs · · Score: 1

      Other languages strictly borrow from Perl if your knowledge of PLT only extends to Perl. Name competitors that adopt Perl's philosophy. Ruby? No.

      On the contrary, Ruby's basic library was designed based off of Perl's, and it follows the "there's more than one way to do it" approach of Perl as well.

    11. Re:Is there a point to Perl any more? by consumer · · Score: 1

      If you take a look at actual job listings, you'll see that there is still significantly more use of Perl than PHP. Many ISPs support PHP, and many small hosted sites use it, but that doesn't make it more mainstream. And the idea that C++ is more mainstream than Java... Where have you been hiding for the last 6 years?

    12. Re:Is there a point to Perl any more? by WWWWolf · · Score: 1

      I don't know. I've been writing a lot of stuff in Perl, and every time I get the feeling that Perl is Not Good, I try to code something in other languages. And every time I do that, I either get the feeling that the other language is completely overhyped, or has even weirder quirks than Perl, or has excellent results but dozens of times the development time.

      (Guess I did't mention the day I rewrote a Perl hack of mine into a well-crafted Java application, quadrupling the line count and having the app do the exact same thing? Was I ever bored that day.)

      So these days, I've wisened up. If there's a task that needs a Perl-esque solution... by Jove, I will use Perl for that. Perl has its niche, especially if you happen to know the language better than that.

      My favorite case was that I was trying to sleep at four o'clock in the morning listening to music, thought "wouldn't it be great if I had a button on my remote control that would make XMMS to say the name of the song?" ... got up, sat before xemacs, wrote the damn code for that functionality (18 lines), stuck it in ~/.lircrc and got back to bed. And the only change I had to do in the morning was to add one error handling case. The fact that I can program interesting functionality half-asleep at four in the morning tells something about the thing's suitability for short hacks. =)

      So for me, it's two things - the fact that I'm familiar with the language, and the fact that Perl is good for short hacks in *NIXlike world. ("I need this app do this weird trick. ... Okay, done.") I also admire its flexibility, it's almost like a weird dialect of Lisp that can actually bend text and binary data with its left hand into weird shapes.

      I don't know about its suitability for larger projects though - I know people do use it for huge projects, and it can be used, it just isn't pretty. Ruby is a lot like what Perl should look like if it'd be suitable for really big things, and I use it for them. And, of course, Perl 6 will look a lot like Ruby too, just undoubtedly more... flexible.

      (And Python is just too quirky for my tastes. Good ideas, but everything is just weirdly done. It's also more verbose than Ruby. In my opinion, Ruby and Perl 6 are both far cooler. And don't get me even started on horrors of PHP!)

      Ah, sheesh, I don't know if this makes any sense, it's early morning here afterall. =)

    13. Re:Is there a point to Perl any more? by Anonymous Coward · · Score: 0

      Ruby's basic library was designed from Smalltalk's, and in fact the language has very little in common with Perl syntactically, and almost nothing in common semantically..

    14. Re:Is there a point to Perl any more? by arabung · · Score: 1

      I'm afraid I'll have to blacklist you from the software development community if you continue to refer to Java and Perl as "niche" technologies. They're wildly popular, regardless of your taste for them.

    15. Re:Is there a point to Perl any more? by shobadobs · · Score: 1

      No, Ruby's library was designed from Perl's. The language itself was designed from Smalltalk. Learn what a "library" is.

    16. Re:Is there a point to Perl any more? by Anonymous Coward · · Score: 0

      WTF? Why is it that when there's an article on PERL there's always a hugh fight about it. Damnit you people don't act like geeks, you all act like assholes. Just leave the guy alone and move along to more important discussions.

    17. Re:Is there a point to Perl any more? by JamesOfTheDesert · · Score: 1
      No, Ruby's library was designed from Perl's.

      Can you point to *anything* to back this up? An interview with Matz, or a posting to some ruby-* list?

      --

      Java is the blue pill
      Choose the red pill
    18. Re:Is there a point to Perl any more? by Krimszon · · Score: 1

      What if you never have brilliant ideas? I'll stick to php then...

    19. Re:Is there a point to Perl any more? by buttahead · · Score: 1

      so... did you let him know how it went? his response, please.

    20. Re:Is there a point to Perl any more? by buttahead · · Score: 1

      dang it! guess I'm in for another 10 years of using cobol.

      this whole portion of the thread reminds me of groundhog day.

    21. Re:Is there a point to Perl any more? by dangermouse76 · · Score: 1

      My Spectrum is better than your C64..

    22. Re:Is there a point to Perl any more? by CDarklock · · Score: 1

      So... lots of people need Perl programmers, and not many people need PHP programmers. Wouldn't that naturally imply that the people who want PHP programmers already have them? Doesn't a distinct *lack* of Perl programmers among those who want them present some evidence that they're thin on the ground?

      Just look at the overall developer community. C++ and PHP groups get a boatload of traffic from an overwhelming number of participants. Java and Perl groups don't; they get a lot less traffic from a lot fewer people.

      And the signal-to-noise ratio is OUTRAGEOUSLY higher.

      If you're an experienced developer who wants to communicate with other experienced developers, you have to go where those developers are. In the massive communities around C++ and PHP, you can't get a good SNR because you're surrounded by all these idiots. There are smart people there, but the idiots are always in the way, so you can't find them. You have to go somewhere the idiots simply can't get over the bar, or at least find it a hostile enough environment that they leave rapidly.

      So you have three choices: a difficult technology, an unpopular technology, or an intolerant community. These strip out the idiots and make it easier to find people worth your time and effort. And while difficult technlogies and intolerant communities might be seen as drawbacks, EVERY technology eventually becomes obsolete and thus unpopular. So after you've been in the industry long enough, *something* you like and know will end up unpopular enough that you can join a community focused around it and enjoy an idiot-free experience.

      --
      Microsoft cheerleader, blue flag waving, you got a problem with that?
    23. Re:Is there a point to Perl any more? by jonadab · · Score: 1

      > These sorts of niche technologies still do the job, and selecting one of
      > them instead of a more "mainstream" language like PHP or C++ identifies
      > you as a particular kind of person.

      You really think PHP is more mainstream than Perl?

      Wow. That's a new one.

      Perl is a core part of practically every non-Microsoft OS and distribution; half the applications on a typical X11-based desktop depend directly or indirectly on it. On Mandrake, for instance, all of the *drak apps (printerdrake, fontdrake, harddrake, ...) depend on it. On Gentoo, the package system depends on it, so you can't even install PHP without already having Perl. It's part of the core on OS X as well. On my Debian workstation, things that depend on Perl, either directly or indirectly, include the font manager, Gnome, KDE, autoconf, xscreensaver, and Mozilla Firefox, among plent of others.

      Whereas, if you uninstall PHP, the only likely casualty is WordPress.

      Yeah, PHP is so much more mainstream, so much more widely deployed and relied on than Perl. That's why LAMP was "Linux, Apache, MySQL, and Perl", but then as an afterthought, to be politically correct and inclusive, they changed it to "Linux, Apache, MySQL, and Perl or Python" and then to "Linux, Apache, MySQL, and Perl, Python, or PHP". You can almost here the unspoken word "even" before the PHP in that last form.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    24. Re:Is there a point to Perl any more? by CDarklock · · Score: 1

      > so much more mainstream, so much more widely
      > deployed and relied on

      By that definition, machine language is even MORE widely deployed and relied on. Are you proposing that machine language is mainstream?

      I think "mainstream" is less about who's RUNNING a given language, and more about who's WRITING it.

      --
      Microsoft cheerleader, blue flag waving, you got a problem with that?
    25. Re:Is there a point to Perl any more? by Intron · · Score: 1
      --
      Intron: the portion of DNA which expresses nothing useful.
    26. Re:Is there a point to Perl any more? by Anonymous Coward · · Score: 0

      I agree that wherever you go there seem to be a lot of idiots.

    27. Re:Is there a point to Perl any more? by shobadobs · · Score: 1

      Stewart: I gather you had worked with both Perl and Python before creating Ruby. What bits of Perl did you incorporate in Ruby?

      Matz: A lot. Ruby's class library is an object-oriented reorganization of Perl functionality--plus some Smalltalk and Lisp stuff. I used too much I guess. I shouldn't have inherited $_, $&, and the other, ugly style variables.


      http://www.linuxdevcenter.com/pub/a/linux/2001/11/ 29/ruby.html

    28. Re:Is there a point to Perl any more? by jonadab · · Score: 1

      > I think "mainstream" is less about who's RUNNING a given language,
      > and more about who's WRITING it.

      Ah, so what you're saying, then, is that more people *write* stuff in PHP than write stuff in Perl. Well, that's harder to measure, but it still sounds like unmitigated malarke to me. I know, for instance, that when the Open Clip Art Library needs changes made to the PHP portions of its website, beyond merely changing stuff in the HTML that is printed out, it's quite a lot easier to find someone willing to rewrite the page from scratch in Perl than it is to find someone to make the needed changes to the PHP. The site started out 100% PHP, adapted from some other website with minor modifications, and at this point about half of it is Perl. There are only a few people involved in the project, so the sample is probably not statistically significant, but nevertheless, there are a *lot* of Perl programmers out there actively writing code.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    29. Re:Is there a point to Perl any more? by CDarklock · · Score: 1

      > more people *write* stuff in PHP than
      > write stuff in Perl. Well, that's harder
      > to measure

      How about this?

      http://sourceforge.net/softwaremap/trove_list.php? form_cat=160

                  Perl (6020 projects)
                  PHP (11536 projects)

      IMO, this sample is actually skewed toward Perl, because Perl is very popular in the open source community. In the larger community of all software developers, including commercial proprietary packages and internal development projects, I believe you'll find that Perl is significantly less common than these figures represent. Not many people are writing Perl commercially, but a lot of people (like me) are writing PHP commercially. There are also a lot fewer schoolchildren learning Perl than there are learning PHP.

      Same for Java. On Sourceforge, Java and C++ run just about neck and neck:

                  C++ (16060 projects)
                  Java (15800 projects)

      However, when I say C++, I'm really talking about C/C++ because all C is valid C++. So let's include C as well:

                  C (15360 projects)

      Looks like about the same ratio. C and C++ represent about twice as many projects as Java. And again, Java is more popular in open source circles than it is in commercial and internal development, so the sample is probably skewed toward Java.

      Of course, there may also be legions of Perl and Java programmers that have blacklisted SourceForge from the community because they disagreed with it.

      --
      Microsoft cheerleader, blue flag waving, you got a problem with that?
    30. Re:Is there a point to Perl any more? by jonadab · · Score: 1

      > How about this?
      > http://sourceforge.net/softwaremap/trove_list.php? form_cat=160
      > IMO, this sample is actually skewed toward Perl, because Perl is very
      > popular in the open source community.

      Sourceforge is not especially popular in the Perl community, however. I'm pretty sure there are rather more than eleven thousand modules on the CPAN. Heck, there are some 4500 *authors* who have published work via the CPAN.

      > Of course, there may also be legions of Perl and Java programmers that have
      > blacklisted SourceForge from the community because they disagreed with it.

      Huh? Blacklisted? Disagreed? More like Perl programmers look at sourceforge and say, "Oh, it's sort of like the CPAN, but without the nifty Perl-specific features." Perl programmers don't use sourceforge very much because the CPAN fills that role in the Perl community and provides significant additional benefits, such as better search facilities (search.cpan.org, which incidentally automatically extracts the embedded documentation from the POD and makes it available in HTML format on the web), dependency resolution (pretty decent dependency resolution, too, significantly better than urpmi or apt-get can manage, for instance), and a larger and less congested set of mirrors, among other things. Plus the CPAN was already the de-facto clearing house for Perl before sourceforge ever existed, so migrating over to sourceforge at that point wouldn't make sense even if it *had* the features CPAN has. The overall reaction to sourceforge in the Perl community varies from nonplussed to "Cool, I'll use that when I do projects in other languages than Perl."

      --
      Cut that out, or I will ship you to Norilsk in a box.
    31. Re:Is there a point to Perl any more? by CDarklock · · Score: 1

      > Sourceforge is not especially popular
      > in the Perl community

      It's not especially popular in the PHP community, either, so I don't see the problem.

      > Huh? Blacklisted? Disagreed?

      It was a back-reference to a previous post, which was intended to be humorous. Unfortunately, you don't seem to get it.

      > Perl programmers don't use sourceforge very
      > much because the CPAN fills that role in the
      > Perl community

      Are you listening to yourself?

      "Perl is not a niche community! We just publish most of our projects at our own special place with features that cater to our own special needs."

      Um... yeah. Sure. Whatever.

      --
      Microsoft cheerleader, blue flag waving, you got a problem with that?
    32. Re:Is there a point to Perl any more? by jonadab · · Score: 1

      > "Perl is not a niche community! We just publish most of our projects at our
      > own special place with features that cater to our own special needs."

      Well, only (most of) the open-source ones, obviously. But the CPAN is a fairly large network. The list of mirrors is about 145K. Describing the CPAN as "our own special place" is about like describing the Atlantic Ocean as "the pond out back".

      --
      Cut that out, or I will ship you to Norilsk in a box.
    33. Re:Is there a point to Perl any more? by CDarklock · · Score: 1

      > the CPAN is a fairly large network

      The question which determines whether CPAN is a niche community is not whether it is *small*, but whether it is *special*.

      So if there is nothing special about CPAN, then it is not a niche community.

      Feel free to mount your argument.

      --
      Microsoft cheerleader, blue flag waving, you got a problem with that?
    34. Re:Is there a point to Perl any more? by jonadab · · Score: 1

      > The question which determines whether CPAN is a niche community is
      > not whether it is *small*, but whether it is *special*.

      Oh, so what you've been saying all along is that Perl is *special*. Right.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    35. Re:Is there a point to Perl any more? by CDarklock · · Score: 1

      No, I've been saying that Perl is a focal point for special *people*, which is useful when you need to find those people.

      Of course, some special people ride the short bus.

      --
      Microsoft cheerleader, blue flag waving, you got a problem with that?
  8. Re:Perl: Lead Painted Asbestos Toys for Tots by winkydink · · Score: 0

    Making statements using broad generalizations without any backup is like pissing in your black pants. It gives you a warm feeling but nobody notices.

    --

    "I'd rather be a lightning rod than a seismometer." -Ken Kesey

  9. Attracting new users, competing with Python? by matt+me · · Score: 1

    With Python storming in popularity recently - there's been a lot of exposure, especially in Google, will Perl 6 be able to take back 'market' share? Currently, with Python appearing everywhere, and Perl 5 perceived as being very old. It'll need to be able to create apps (I'm very impressed by a couple of small python-gtk things). Sure, the Perl user base will never defect (these monks are devout and Perl will always be the true way).

    mod_python at Google is clearly as much a workhorse as mod_perl at the BBC.

    I've just learning to be a parselmouth (am a perl monk) and it's a nice language. less punctuation in syntax, and some friendly things like using indentation instead of square brackets (your code always look neat, but you could never do obfuscation)

    1. Re:Attracting new users, competing with Python? by Anonymous Coward · · Score: 0

      Significant whitespace is EVIL!!!! Die, Python, die a thousand bloody, flaming deaths!

    2. Re:Attracting new users, competing with Python? by Coryoth · · Score: 3, Informative

      Perl6 has the advantage of starting from the beginning, taking all that was learned from the evolutionary development that lead to Perl5, as well as the lessons learned from other languages like Python and Ruby. Honestly, read through the design commentary for Perl6 by Larry Wall. There are a lot of good ideas there, and Perl6 promises to be a much cleaner, more consistent and more elegnt language than Perl5 - that is, it has learned what was good in Perl5 and thrown away the (vast amounts) of cruft. Looking at what they're proposing, if it actually works as promised then I do think it will compete well with Python - and I'm a Python person myself*. Honestly, read a little of what Perl6 has to offer before you dismiss it out of hand. It looks like it will be a very nice language indeed.

      Jedidiah.

      * One of the things I like about Python is that they're willing to deprecate and then *remove* features to help combat cruft.

    3. Re:Attracting new users, competing with Python? by belg4mit · · Score: 2, Informative

      It's a false perception. 5.6 was leaps and bounds above 5.0.5, and 5.8 is a quite a stride past 5.6.
      Not everyone buys into 1, 2, 3, 95, 98, 2000 type
      numbering schemes :-P There was even a proposal that
      perl 6 should be the last major number and the versioning should approach 2pi

      --
      Were that I say, pancakes?
    4. Re:Attracting new users, competing with Python? by metamatic · · Score: 1

      It seems like you're reading a different Perl 6 design commentary from me. To me, Apocalypse 12 (for example) is a cruft sandwich with a side-order of bloat, sprinkled with liberally with sigils. More thoughts at http://www.xciv.org/~meta/2005/03/02#2005-03-02, but basically the way I see it is that Perl doesn't need more ideas, it needs fewer.

      (Still writing Ruby, still liking it.)

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    5. Re:Attracting new users, competing with Python? by Coryoth · · Score: 1

      It's a matter of taste really though. The object system in Perl6 is considerably cleaned up. Yes it has the usual Perl punctuation soup as syntax, but structurally it is a lot cleaner. Some people adore Perl's syntax. You seem to be quite fond of Ruby. Personally I quite like the spareness of Python. If all you have issue with is the syntax... well I can't help you with that, because I don't really like it either.

      As an aside, variable declaration is something Python does manage (there's no "use strict" - it basically has that on by default immediately). As an added bonus an option for declaring static types as well seems to be in the works.

      Jedidiah.

    6. Re:Attracting new users, competing with Python? by Anonymous Coward · · Score: 0

      Youknow,youaresoright.WhydidInotpreviouslycometoth isobviousconclusion?Thankyouforhelpingmeseetheligh t,orratherceaseseeingthelightasthecasewarrantsthis time.Theuseofwhitespacetodenotelanguagestructureis seriouslyabadideaandiforonesecondyourrequestthatal llanguagesthatmakeuseofitdieimmediately.Atleastthe whitespacethatSlashdotwillinjectintothispostwillfa iltobesignificant,otherwiseIwouldhavetofurthersugg estthatSlashdotdieaswell.

    7. Re:Attracting new users, competing with Python? by metamatic · · Score: 1

      I basically don't like syntax at all, which is why I like Ruby. There's very little syntax to remember, and it's all remarkably consistent.

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    8. Re:Attracting new users, competing with Python? by Lost+Found · · Score: 1

      Get started improving Ruby then, because Perl 6's object model that you call a cruft sandwich with a side-order of bloat is about to kick *everyone's* ass in OO flexibility. I'll speak to you again when you're inheriting my Perl 6 objects in your Ruby code, thanks to Parrot.

    9. Re:Attracting new users, competing with Python? by SilicaiMan · · Score: 1
      One of the things I like about Python is that they're willing to deprecate and then *remove* features to help combat cruft.

      That's mostly a taste issue, and a very debatable one too. One of Larry Wall's design goals is backward compatibility, which is the main reason why Perl5 is the complicated monster that it is today. Perl1 programs run perfectly fine under Perl5 today. Whether or not this is a good thing largely depends on who you ask.

    10. Re:Attracting new users, competing with Python? by Anonymous Coward · · Score: 0

      Perl 6 doesn't exist. Why are you a fanboy of it? I have a real job to deliver now.

    11. Re:Attracting new users, competing with Python? by Anonymous Coward · · Score: 0
      New scripting languages always come and go; and one's best served by at least having some knowledge of a variety of them. Perl 5 has an incredible critical mass of applications and Perl 6 by virtue of it's backward compatability is a vital skill.

      Sure Python is nicer than Perl 5 but IMHO Ruby is at least as much a big step nicer than Python. I think that's the arena that Perl6 is really competing - it's Perl6 vs Ruby vs the-next-generation-of-python.

      (we were both trolling, weren't we -- personally I like Ruby and personally you like Python and personally other people like Perl -- and all three languages continue to improve)

  10. Re:I hate Perl. by mopslik · · Score: 2, Funny

    What is the output of the following?

    "Be Sure To Drink Your Ovaltine." What the...?

  11. Re:Perl 9 is already out... by hahafaha · · Score: 2, Funny

    Would you care to provide any reasons for switching to Python?

    Holy wars such as Perl vs Python are typical but altogether unneccecary. Both Perl and Python are maturing and are now sophisticated languages. Furthermore, they are suited for different things. For example, if I were writing a program that needed advanced string parsing, I would use Perl. If I was writing a graphical game, I would use Python. If I was writing a CGI script, I would use Perl. If I was writing a program that described various objects in space, I would use Python.

    There is no reason to get so defensive about these things with the exceptions of Windows vs Linux (Linux) and Emacs vs Vi (Emacs).

  12. Re:Are people still using PERL? by Seumas · · Score: 1

    You've never heard of mod_perl?

    I'm pretty sure Amazon runs heavily on perl.

  13. CPAN by kevin_conaway · · Score: 4, Insightful

    I believe that CPAN is one of the major (if not the only) things keeping Perl alive and well.

    It is a great language, and has been used successfully by many huge companies (Amazon for one), but I think if those companies had to redo it again today, I don't think they would choose Perl again. I think that purely as a language, it has been surpassed.

    Having a large, mature 3rd party library is what is hampering the adoption of some of the up and coming languages.

    1. Re:CPAN by belg4mit · · Score: 1

      You sir, do not deserve to have a similar last name to The Damian

      --
      Were that I say, pancakes?
    2. Re:CPAN by radtea · · Score: 5, Insightful

      I believe that CPAN is one of the major (if not the only) things keeping Perl alive and well.

      My own experience suggests this is absolutely true. I learned a bit of Perl in 2000, then had a look at Python, and realized that 90% of what I wanted to do, no matter what I wanted to do, was already implemented in Perl modules. Python, in contrast, had a a much, much smaller collection of stuff available. Despite certain nice features in Python, the abundance of pre-existing native functionality in Perl won the day for me.

      One could argue that Perl functionality can always be called by other languages, but I have extensive experience in mixed-language programming (C/FORTRAN, C++/Java and Perl/C++) and don't really want to deal with the debugging nightmare that it often entails. So given that I could do everything I wanted to in Perl and still live by Booch's Rule 122 ("Never write code unless you absolutely positively must"), Perl was the clear choice.

      The only likely replacement for Perl is Perl, as Perl6 will be able to draw on the huge community of Perl developers who have a vested interest in keeping the language alive and flourishing, and it is very likely that debugging from Perl6 into Perl5 will be relatively seamless.

      --
      Blasphemy is a human right. Blasphemophobia kills.
    3. Re:CPAN by consumer · · Score: 1

      Amazon chose Perl pretty recently, so I'd say you're wrong about that. I don't see the other major companies that use Perl extensively like Ticket Master, CitySearch, Overture, and Yahoo complaining about it either.

    4. Re:CPAN by Cyno · · Score: 1

      I have yet to see a language that surpasses it, except Perl 6. Java, Python, Ruby, C, C++, etc. All have their own problems and none of them can use my Perl 5 objects.

      Perl 6, on the other hand, might be able to use my Perl 5 objects, along with some Java, C, python, brainfuck, etc. libraries. If it gets to that point the bar for all other languages will have been raised, including .NET. But how long will it take to get to that point?...

    5. Re:CPAN by Thomas+A.+Anderson · · Score: 1

      Amazon chose Perl pretty recently

      I'm pretty sure it's been a while now - I had a conversation with a recruiter from Amazon about perl around 6 years ago (and it was their main language then).

      --
      Personally its not God I dislike, its his fan club I cant stand (bash.org)
    6. Re:CPAN by Anonymous+Brave+Guy · · Score: 1
      Java, Python, Ruby, C, C++, etc. All have their own problems and none of them can use my Perl 5 objects.

      But is that a problem with those other languages, or with Perl?

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    7. Re:CPAN by SilicaiMan · · Score: 1
      It is a great language, and has been used successfully by many huge companies (Amazon for one), but I think if those companies had to redo it again today, I don't think they would choose Perl again.

      Why do you think that? Do you have any data to support those thoughts? What difficulties are they facing today due to their choice of using Perl? Most companies usually care about reducing cost (money). Had they used a different language, would their total costs went down? I don't think so. It is also definitely much easier to find a Perl programmer than Python/Ruby/etc.

      One common fallacy that people repeat is that Perl encourages sloppy programming. That is false. Perl tolerates it, but no where in the docs, or on comp.lang.perl.misc and other Perl forums, has sloppy programming been encouraged.

      I think that purely as a language, it has been surpassed.

      Surpassed how exactly? What precise features do you think are missing from Perl that other languages have?

    8. Re:CPAN by zippthorne · · Score: 1

      Ok he's saying perl can use C libraries but C can't use perl objects. So it's not so much a problem that the other languages aren't cross compatable, it's just that perl is and they aren't.

      The closest analogy I can come up with is the english language. There are things you can say in english that you can't say in other languages, but english is a mutt language so there's a pretty good chance that foreign idioms have already been assimilated and many of the foreign words as well. So technically anything you can express in french, german, spanish etc, you can express equally well in english, but you can't go the other way. Is that a deficiency of the other languages (who I might add are more "strongly typed" than english)? or of english?

      It would seem to me that it is actually neither, it is a deficiency of the speaker not to have access to the constructs of several. It just so happens that as english speakers learn other languages, english is also improved.

      --
      Can you be Even More Awesome?!
    9. Re:CPAN by Cyno · · Score: 1

      Java, Python, Ruby, C, C++, etc. All have their own problems and none of them can use my Perl 5 objects.

      > But is that a problem with those other languages, or with Perl?

      With those other languages. Perl works just fine with my objects. ;)

  14. WORD by Anonymous Coward · · Score: 1, Funny
    PERL is completely obsolete. I've been programming PERL since 1984, and I can tell you that it's day is done. For example, this PERL program prints a message:
    $_="krJhruaesrltre c a cnp,ohet";$_.=$1,print$2while s/(..)(.)//;
    while this Python program does the same thing:
    import sys
    import re
    import string
    import trousers
    import letters
    import numbers
    import re again
    import sausage making guide
    import cars
    import import
    import print
    import def
    import class
     
    class Print_that_guy:
      def __repr__(self):
        return "Just another Python haxor!"
     
    that_guy = Print_that_guy()
    print (that_guy)
    PERL IS SO LAME!
    1. Re:WORD by utopianfiat · · Score: 1

      I can write that shorter.
      ($_) = ("krJhruaesrltre c a cnp,ohet" =~ ms/^((\w+).+)$/\1\2/g); foreach s/(..)(.)// {print $+;}

      --
      +5, Truth
    2. Re:WORD by afd8856 · · Score: 1

      That's just so ignorant.
      One of the things that I appreciate when reading Other People's Code (which you kind of have to do in the Zope/Plone world, and for good reasons: the projects are young, there are a lot of changes, the source code are mostly readable and commented, and the major things are documented any way) is that you can clearly see at the top of the file what else is used in the curent file. And if you want to dig things deeper, you just look in the referenced file.

      And really, when you compare, even in your bogus example, the python code is so much clear and understandable.

      --
      I'll do the stupid thing first and then you shy people follow...
  15. Re:It's a php/perl post! by Black+Perl · · Score: 3, Informative

    Where are the Ruby on Rails people? I expected 100 of them to speak up before the traditional "FRIST PSOT!!!"

    Well, for one, perl now has a nice framework similar to Rails called Catalyst (http://catalyst.perl.org/). It's a lot closer to Rails than a lot of other languages' attempts to clone Rails. And yet the Catalyst dev team have specifically chosen to diverge from Rails in certain areas, trading a bit of simplicity for complete flexibility, avoiding some limitations you could run into in Rails.

    --
    bp
  16. Re:Clarity by B'Trey · · Score: 1

    Humor noted, but the "writing" in question was writing ABOUT the language, not IN the language. Perl is designed to mimic many aspects of natural language, and Larry Wall is a linguist. The difinitive Perl books are very well written from an editorial standpoint. YMMV when it comes to the language proper.

    --

    "The legitimate powers of government extend only to such acts as are injurious to others." Thomas Jefferson.

  17. Re:Are people still using PERL? by utopianfiat · · Score: 1

    You've never heard of slashcode? :)
    ever notice the little .pl at the end of every slashdot module?

    --
    +5, Truth
  18. PHP5? by matt+me · · Score: 2

    You're joking, it's not PHP that Perl has to compete with, it's Python! PHP will always be slower than mod_perl 2 on Apache2 (bbc.co.uk runs on this and it is a monster), but Perl's primary use is not for server scripting (mod_perl) but as a power tool. Whenever you need to do something with your system beyond the power of shell scripting, use Perl;

  19. Re:Perl 9 is already out... by closer_neg9 · · Score: 1

    Someone should release a book on Windows Vista now that a beta is out.

    /me opens the cover of "Windows Vista for Dummies"...

    "This book covers the 3 (or so) new features of Windows Vista. For more detailed information about this operating system, please buy a copy of 'Windows XP for Dummies'"

  20. Re:Perl 9 is already out... by GeckoX · · Score: 1

    Um, check amazon.

    They beat you to the punch, a long time ago now.

    --
    No Comment.
  21. Re:Perl: Lead Painted Asbestos Toys for Tots by SimHacker · · Score: 0, Troll
    Touched a nerve, have I? For plenty of proof and backup, read my previous posts to Slashdot.

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
  22. Moving from Perl (slightly OT) by Seumas · · Score: 3, Interesting

    I was going to bring this up in the thread about beginning programming the other day, but I came too late to the party. Hopefully someone can offer me some advice.

    First, I'm not really a programmer. Not professionally, at least. I've been writing Perl for about four or five years, though. I'm not well-versed in OO and I'd like to be. I've just found it such a stumbling block in Perl and that's probably because I'm doing in Perl in the first place. It's the first language I picked up since I played around with BASIC and Pascal as a little kid.

    I run a large auction site. Maybe 40,000 members. I wrote the entire engine (auction, forums - everything) in Perl. But it's getting complex and difficult to maintain as it is. And the performance is not holding up. I could move to mod_perl, but rather than re-writing everything (and possibly doing so in OO), I thought I'd just write it in another language.

    I don't want PHP. So that leaves me mostly with Python and Ruby. I've done a lot of reading, but am not sure which would be more appropriate. I think Python might stick me back in the old "easy to do things wrong and blow your foot off" world of Perl. Ruby on the other hand would probably help me gain a better understanding and real-world use of OO.

    Performance is an issue. So are available packages. My backend is postgresql and I need whatever language I use to have an extremely capable and flexible and mature postgresql DBI.

    At the moment, I have to say I'm leaning toward Ruby. But it does seem that Python might have more mature packages available to it and be a bit more widely used. I'm just skittish because everything I've heard has given me the impression that it's very Perl-ish and if I'm going to be in that world, I might as well just stick with Perl in the first place.

    Thoughts?

    1. Re:Moving from Perl (slightly OT) by Creedo · · Score: 1

      I think you would be better off rewriting it in OO Perl based on mod_perl2. You don't have to learn a whole new language(and the attendant kludges that one makes when writing an app in a language they are learning) and it will fast and stable. Plus, you can just transplant any neat little regexs and functions instead of reimplementing them. YMMV.

      --
      All that is necessary for the triumph of good is that evil men do nothing.
    2. Re:Moving from Perl (slightly OT) by Anonymous Coward · · Score: 0

      I cant comment on Ruby, just on Python.
      I think Python might stick me back in the old "easy to do things wrong and blow your foot off" world of Perl.
      Quick'n Dirty is much harder in Python than in Perl, while Quick and not Dirty is as easy as in Perl - or even easier.
      Just start a python command line and type "import this" and you will see why. ;-)
      I'm just skittish because everything I've heard has given me the impression that it's very Perl-ish and if I'm going to be in that world, I might as well just stick with Perl in the first place.
      Python is not perl-ish in a bad way. Take a look at zope.org or gentoos portage and you will see that you can do big projects in python.

    3. Re:Moving from Perl (slightly OT) by Marc2k · · Score: 4, Insightful

      No. Here's your main problem:
      First, I'm not really a programmer.
      I wrote the entire engine.
      But it's getting complex and difficult to maintain as it is.
      And the performance is not holding up.

      So you're admittedly not a very experienced programmer, and you're expecting to have the web logic engine that you built, presumably from scratch, be scalable and modular, without ever refactoring it? In programming, we call the kind of query you just gave a 'silver bullet' problem, and unfortunately, there is none in this case. No one language, or framework, for that matter, is going to fix problems inherent in poor design. That's not to necessarily denigrate your programming skills, but don't expect that rewriting an app that was developed from scratch and is exhibiting growing pains to see great speed and modularity gains by porting it to another language. I've got a good hunch that if you started all over again, still using Perl, and chose your toolset wisely, your app would be more stable, scalable, functional, and modular.
      I've worked with a lot of web languages/frameworks, and yes, Ruby would similarly solve the problem, but please don't ever say "real-world use of OO" with regard to Ruby. Rails is what, a year old? Basecamp and 43 Things are the largest sites actually running Rails (the latter being as esoteric as you can get, and pretty low-traffic, at that), and you're not going to see a major player using Ruby at this poing. If I take your meaning of "real-world" correctly, CORBA is more like what you're talking about, though I don't think you necessarily want to mess with that sort of thing right now.

      --
      --- What
    4. Re:Moving from Perl (slightly OT) by strAtEdgE · · Score: 1

      I second this. Going from straight Perl to mod_perl is a great step to make for the speed and functionality of your site. I think you might be surprised by just how much speed is possible with mod_perl.

      There are two ways to port an existing application to mod_perl; the fast way and the proper way. The fast way is essentially to take your entire existing application and make it one giant function within mod_perl. Try a quick basic port and see how much better your site performs once you do. I think you'll be encouraged enough to go on and do a 'proper' port to optimize your site specifically for mod_perl.

      --
      ----- sXe
    5. Re:Moving from Perl (slightly OT) by Anonymous Coward · · Score: 0

      I would opine that the complexity and difficulty you are now discovering has less to do with your choice of language, and more to do with your relative experience with software engineering.

      That is to say, you fully admit that you are not a "professional programmer." But even beyond that, there is quite a difference between knowing the ins and outs of a particular language, and best practices when it comes to designing large and complex software systems.

      I'll also add that your comments about performance and not using mod_perl indicate that you probably have little exposure to running and maintaining complex systems, as well. There are enormous performance gains to be had out of using mod_perl (or really, fastCGI). There are also a lot of cool things you can do from within mod_perl (or mod_python, mod_ruby, etc. etc.) that aren't as easy (or possible) with straight CGI.

      Hopefully you don't take this as a flame or anything like that. It sounds to me like you've reached that juncture that everyone reaches repeatedly during their lives: "I've taken what I know about as far as I can, what's my next step."

      My recommendation, based only on the information you've provided in your post, is that you should stick with Perl. Rather than spend your energy learning "yet another language," focus on learning good software design technique, performance tuning, mod_perl, and so forth. Languages are dime a dozen and easy to pick up. Learning some techniques that will apply no matter which language you're using will prove to be more rewarding.

    6. Re:Moving from Perl (slightly OT) by Cytlid · · Score: 1

      I have similar experiences as you do, with programming languages, except I don't manage a large auction site.

      One of the things I've been learning lately, is that with Perl, there are ways to optimize it. I'm not second guessing your proficiency with perl, but if I was in your shoes, I have an idea what I would do.

      Have you ever thought of open-sourcing your engine? If some of the gurus come by and optimize your code, you would benefit immidiately and learn quite a bit in the process.

      Again, I don't know how well of a perl guru you are, but there is "more than one way to do it" and there are some pretty darn good ways to optimize it. LinuxJournal had an article about embedding C code in certain places for perl when performance was needed. Just some ideas, thoughts...

      --
      FLR
    7. Re:Moving from Perl (slightly OT) by AnotherShep · · Score: 1

      Using Postgresql and talking about switching from perl to Python or Ruby?

      My thought is that we need a +1 flamebait mod. ;)

    8. Re:Moving from Perl (slightly OT) by rgmoore · · Score: 1
      I've got a good hunch that if you started all over again, still using Perl, and chose your toolset wisely, your app would be more stable, scalable, functional, and modular.

      Even better, don't actually rewrite the app, just refactor it. Break spagetti code up into proper subroutines. Move commonly used functions into separate modules. Take the time to comment your code while you're working on it. In less time that you think, you'll have a functional system that can actually be maintained and improved without having to worry about breaking everything.

      --

      There's no point in questioning authority if you aren't going to listen to the answers.

    9. Re:Moving from Perl (slightly OT) by qlippoth · · Score: 3, Insightful

      Performance is an issue. So are available packages. My backend is postgresql and I need whatever language I use to have an extremely capable and flexible and mature postgresql DBI.

      From the standpoint of integrating a website/database, the database will always be your substantial performance bottleneck, unless your code is utter garbage. PHP, Python, or Ruby are all adequate for this task.

      The biggest thing you can do for performance is design a Normalized database, and to make sure there is proper indexing for all the queries you run. If you put adequate research and effort into these areas, you'll see better performance gains than putting any effort into rewriting code.

      --
      Mmmm, -funroll-loops
    10. Re:Moving from Perl (slightly OT) by jericho4.0 · · Score: 1
      The points above about sticking with what you know make sense, but you admit that your site is getting hard to maintain. A framework like Ruby-on-Rails will likely alleviate a lot of the scalability and maintenance issues. If you've managed to hack together a functioning site with 40,000 members in perl, you won't have too much of a problem learning Ruby or Python. They both generally have One Well Known Way To Do It,

      --
      "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
    11. Re:Moving from Perl (slightly OT) by Seumas · · Score: 1

      Fortunately, pgpool increased my performance significantly about a year ago. Even with proper indexing, things tend to slow down a bit after a few million records in a particular table. My code is actually not all that inefficient. It really comes down to a concern of maintenance so I can continue to expand on things. Perl makes it very easy to do things the way you want to do them if you know how to do them, but as a first language, it's very difficult to figure out what the right ways to do them are in the first place. You don't have a rigid structure in which to gather the basics.

      Just look at any discussion on OO with regard to perl, for example. Almost every discussion of it (including books) tell you how you can do it similar to C++ or Java. They tell you "it's just like doing it in this other language, except you do XYZ". Well, that's great. But there are a lot of people who aren't coming from another language and they don't need to know the 20 difference ways they can implement it. They need to know the proper way and they can expand on that once they have a clue.

    12. Re:Moving from Perl (slightly OT) by Seumas · · Score: 1

      Actually, I'm pretty familiar with mod_perl and could probably recite the red and white mod_perl cookbook front to back. But knowing the anecdotal performance increase that mod_perl offers and actually implementing it safely are two different things. Sure, I can take the cheap way and triple performance - but to do it the proper way is a tad more difficult. For one thing, if you're fairly inexperienced outside of Perl - how can you possibly be certain that your code is "clean" enough to run without incident in mod_perl? And it's difficult to hit it with the same degree of testing that it will see in the wild, where hundreds of users making thousands of connections might introduce strange glitches that you didn't see in your own direct testing.

      My main intention for rewriting in another language (instead of rewriting in Perl) was that I expected another language to better prepare me than Perl has. In perl, it's real easy to make things work - but not always in the "best" or "proper" way. So you don't really learn anything of value. Something like Ruby (I presumed) would instill a structured knowledge that I wouldn't otherwise have gained.

      The best Perl programmers seem to be guys who are from another language and have the foundation on which to manipulate perl to do their bidding in a really strong way. I constantly doubt myself with Perl, because I may know "how to do it" but I don't know if the way I'm doing it is "right". Even after four or five years. Short of going through a few years of CS to grasp programming theory and design, I don't know that I'll ever have that sort of strength. And, really, that's what has kept me from doing a switch to mod_perl (or even OO-ing my codebase for that matter) for the last three years.

    13. Re:Moving from Perl (slightly OT) by Anonymous Coward · · Score: 0

      OO is a bunch of hype for the most part, especially if you are just working on a website. Upgrade your server and you'll be fine.

    14. Re:Moving from Perl (slightly OT) by Anonymous Coward · · Score: 0

      Ruby on Rails if you want to switch, Catalyst if you're comfortable with perl and don't want to switch. There are excellent introductory articles on the O'Reilly web site for both of them.

    15. Re:Moving from Perl (slightly OT) by volsung · · Score: 1
      I don't know anything about Ruby, but I do program in Python a lot. Perl was my first experience with a scripting language. Coming from C, I was initially amazed at how nice it was to have strings be first-class data types and to no longer have to explicitly manage memory. The syntax was a little confusing, and I never really got proficient at it. I tried reading some OO-based perl and got totally lost.

      Some years later, I happened to try out Python for a project and fell in love. I find the syntax easier to remember, the OO is clear and straightforward, and while the selection of libraries is nowhere near as comprehensive as Perl, it is pretty good.

      I would strongly suggest you browse through Dive Into Python. That was how I learned the basics of the language.

    16. Re:Moving from Perl (slightly OT) by Seumas · · Score: 1

      And that's totally what my problem is right now. I can make things work, sure. I can make them work very well. But I have about 500k worth of code (my own - not counting imports and not counting HTML::Template templates) and while it performs well, it's a bitch to maintain. Especially since various aspects of the system tie together (which is where my interest in trying OO comes in). For example, I wrote my own forum software, image manipulation software (for resizing, watermarking, logo-ifying images), auction-tracking system, private-messaging system.. you name it, my system has it... and much of it is intermixed, which is why I've been refactoring my code in my free time.

      But when it comes right down to it, it's a problem of "great - this way works - but is it the RIGHT way?".

      And by "right way", I mean - is it the proper way as far as a design aspect. I'm not a child prodigy who has been writing code since he was 10 or something. Outside of Perl, my only experience is in being able to vaguely read C/C++ enough to debug things when presented with the source code and GDB/ADB/DBX and a core file.

    17. Re:Moving from Perl (slightly OT) by Seumas · · Score: 1

      Have you ever thought of open-sourcing your engine? If some of the gurus come by and optimize your code, you would benefit immidiately and learn quite a bit in the process.

      I've considered it ever since I had the first version written a few years ago. Originally, I used some flat-files based auction system that (I think) might have been open-sourced. At least, at the time. Then they came out with a version that used mysql, but I had already started writing it from scratch on my own (mostly because I wanted the security of transactions which Postgres did and MySQL did not at the time).

      I still think about doing it from time to time, but the biggest things stopping me are that I fear my code might be completely useless and nobody would want to expand on it and that I don't have the experience necessary to head, say, a project on sourceforge for it.

      On the other hand, I've actually had people ask to buy my software. Or at least, have me set it up and install it for them and build them their own auction site (probably a couple dozen requests in the last three years). I barely have time to run my own site after work, much less help someone else - so I've declined. Plus, I don't want to charge people for what is essentially a bunch of crappy-ass amateur code.

      If I had the money (my site is free - I don't make a dime) I would probably hire someone to help refactor my code and school me as they do it. Then I'd GPL it.

      I know, I know... it sounds a lot like cleaning your house before the maid comes so that you aren't embarrassed by your mess...

    18. Re:Moving from Perl (slightly OT) by Seumas · · Score: 1

      I'd been looking at Rails for awhile, but I'm still unclear on how powerful it is. Sure, it will apparently run a blog - but will it run an auction site swiftly and reliably? And Rails (without learning Ruby in-depth first) seems like setting myself up for a catastrophe.

      I had never heard of Catalyst before today, believe it or not. It might be worth my time. I know Perl fairly well (I don't think I deserve the Monk status I have on perlmonks by any stretch, but I'd say I'm somewhat beyond intermediate). That is a bonus. And if it will help provide me with a structure, it would be valuable.

      That's what I really need (and I've said it several times in this thread, I know). I need to see "this is how it's done". Then I can do it. I'm great at taking off on something once I know I'm doing it the right way. it's the concern that what I'm doing, while working, might be fraught with pitfalls that an experienced programmer would laugh over and give me a list of everything I'm doing wrong. And actually, I'd LOVE that. I try to pick things up here and there, but sometimes you just need someone to set you straight so you can proceed with confidence.

      Trying to pick up OO has been the biggest pain in the ass ever. So much so that I've started buying the "OO is useless in a lot of situations and is overhyped" line, just because it saves me from having to figure it out. :)

      I get the gist of it. I can even semi-implement it. It was easier once I learned about singletons. But when it comes to doing OO in perl, it seems a case of "You know how to cook noodles, but depending on how you cook them you can end up with top ramen or something from Spago's".

    19. Re:Moving from Perl (slightly OT) by Anonymous Coward · · Score: 0

      Well, one of the nice things about the Perl community is that it is fairly transparent. The mod_perl cookbook, for example, is a pretty good collection of the "best" or "proper" way to do things.

      But my main point is that it isn't a particular language that will instill structured knowledge on software design practices. Rather, you'd be better off exploring software development methodologies and then applying them back to your Perl code. At least in the near term.

      Or, look at it this way. No one language is going to be a magic bullet that teaches you good software development practices. So if you stick with Perl, you can concentrate on learning good software design, testing methodologies, and so forth. If you pick a new language, then you have to worry about picking up its syntax at the same time.

      And, in my opinion, you don't necessarily need to take a formal CS education to learn these things. There are lots of good books on software design, OOP, etc. out there, as well as tons of free stuff on the web. You might check out one of Damian Conway's Perl books sometime (like Object Oriented Perl). He's a CS Professor and Perl guru, and writes (and presents) in a very accessible manner. (I've personally seen him teach a room full of people about quantum superpositions and Latin in the span of an hour and have it feel like you just saw a demonstration on how to change a tire.)

      Just 2 cents from a guy who jumped off the language-of-the-week bandwagon a few years ago and greatly improved the scope and complexity of his own projects.

    20. Re:Moving from Perl (slightly OT) by abulafia · · Score: 1
      Even better, don't actually rewrite the app, just refactor it.

      I have to agree. If you've got 40K members now, you have a lot to lose, and trust me, unless you hire an experienced team to replace your code, you probably will lose a lot of them when you transition to a new code base. There is a lot of sunk knowledge in that code, and you've probably forgotten why some of the spagetti was actually mostly a good idea at the time. So take it apart slowly.

      Bring up a stage under mod_perl, and see what breaks. Most folks having trouble with Perl OO have trouble because it is permissive - it is up to you to find the style you like (and not muck around in other module's sandboxes). So pick one of them, and go with it. Other than that, I have little to add to what the parent poster said. Oh, and don't copy-paste clever/stupid map() tricks lifted from others unless you actually know what they do.

      I still say there's no better language for text processing, of which web presentation is one application subset.

      --
      I forget what 8 was for.
    21. Re:Moving from Perl (slightly OT) by Anonymous Coward · · Score: 0

      As an ex-Perl programmer who has moved to Python, I have to agree with the parent -- try mod-perl2. Moving from Perl to Python isn't going to gain you any more speed than moving from Perl to mod-perl. I moved my large community site from Perl to Python and it took years to reimpliment all the features of the old site. Don't underestimate the value of the code you have already written.

    22. Re:Moving from Perl (slightly OT) by MemeRot · · Score: 1

      I haven't worked with it, but Zope (zope.org) is written in Python. You might be able to transition to it by putting whatever content management type stuff you have in there while figuring out how to do whatever it doesn't do in python yourself. There are a number of commerce modules for it, don't know how easy it would be to modify them rather than just doing it yourself. I'm sure there will be a bunch of code you do yourself, but no sense reinventing the wheel for basic website stuff.

    23. Re:Moving from Perl (slightly OT) by Anonymous Coward · · Score: 0

      omg, how is CORBRA at all relevant to this problem?

    24. Re:Moving from Perl (slightly OT) by rgmoore · · Score: 1
      you name it, my system has it... and much of it is intermixed, which is why I've been refactoring my code in my free time.

      If your problem is that you've intermingled the parts of your system, you have an architecture problem, not a language problem. As the saying goes, you can write spagetti code in any language.

      Either you know enough about what's wrong with your code to rewrite a better version in another language or you don't. If you do know enough, you also know enough to refactor your existing code, and that will probably be faster and generate fewer bugs than trying a rewrite. If you don't know enough, you'll just wind up with the same problems (or a different, but no less intractable set of problems) in your new version. Either way, you're probably better off investing your time in improving what you have than starting over from scratch.

      --

      There's no point in questioning authority if you aren't going to listen to the answers.

    25. Re:Moving from Perl (slightly OT) by holy+zarquon's+singi · · Score: 1

      OK, I suggest you read Learning Perl Objects and References (O'Reilley) and check out Maypole. After a month or so of pain, you'll be wondering why you thought perl was defficient agian. Mod_perl is really the way to go, combined with all the stuff on CPAN (My favourites module groups are LWP:: and Lingua::) for doing real - non web - work, you won't look back. I'm in roughly the same position as you by the way. Self taught, mostly I consider myself a scientist, not a programmer and I get to use the tools that I choose because of that. I'd learn python or ruby (but not php, I dabbled in that a few years ago and it was way too ugly) if I didn't have better things to do with my time.

      --
      "...we should just trust our president in every decision that he makes and we should just support that." B.Spears 2003
    26. Re:Moving from Perl (slightly OT) by buttahead · · Score: 1

      If you are concerned with knowing "the right way" to do something in perl... another recommendation for perl cookbook from me.

      Another very good way to learn the "proper" path is by reading the more widespread modules in CPAN. Once you read 3 prolific modules, you'll start to see ways of doing OOP and other things in the "idiomatic" way. Usually those core modules are very widely used and well engineered. Seeing them provides insight into ways that you can improve your own code.

      On the other hand... keep in mind that perl makes getting the task done easy. unless you are under stringent engineering goals, there is no need to follow the "proper" path. TIMTOWTDI. there is time later to go back and refactor your quick and dirty code into something that compares well with efficient code from the core CPAN modules.

    27. Re:Moving from Perl (slightly OT) by HighBit · · Score: 1

      open source is all about releasing early and often.

      the linux kernel, for example, didn't start out by being perfectly written, immaculately maintained code. but lots of people use it now.

      trust me, there is no doubt plenty of open source code that is much crappier than yours. if yours works, its already better than lots of half-completed open source projects :)

      I say, release your code and see if anybody sends in patches. at the absolute worst, no one will care.

    28. Re:Moving from Perl (slightly OT) by Anonymous Coward · · Score: 0

      Thoughts?

      It is a poor carpenter that blames his tools.

  23. Re:I hate Perl. by Anonymous Coward · · Score: 0

    FUDGE!

  24. perl confusing but not dead by cerelib · · Score: 1

    Take a look at the google zeitgeist and look for "perl programming". This proves that Perl still owns the market and still nobody save an enlightened few knows how to use it.

    Google Zeitgeist

  25. Show some "unreadable" Perl code or shut up by defile · · Score: 5, Insightful

    Everyone attacks Perl code for being unreadable but I don't think I've ever come across real world Perl code that I couldn't manage to deal with (eventually). I've seen some bad code and written some bad code and Perl doesn't have exclusivity in either of those areas. ;)

    Does someone have a good example of unreadable, real world Perl code? And I don't mean obfuscated Perl contest entries.

    When it comes down to it, other people's code is just freakin' unreadable no matter what they write it in. In fact, my own code looks unreadable and unmanagable if I haven't seen it in awhile. Just the nature of the industry.

    Maybe Perl is just a high profile target since the internet is full of small (and useful) pieces of Perl code?

    1. Re:Show some "unreadable" Perl code or shut up by hahafaha · · Score: 1

      Although I am a big Perl enthusiast and use it extensively, I do have to admit there are some ugly things in Perl.

      The first thing that comes to mind are regexes. I recently took a Perl course (I wanted to meet other Perl enthusiasts) and we had an assignment to take a string of characters and see if they were a valid date and the day of the week (this was in the beginning of the course. Most people wrote simple logic for this, but this one girl (a ruby programmer wrote a HUGE regex. That could be an example of unreadable code (although it was quite elementary)

      But then again, I would argue that C is ugly and Perl regexes are beyond the realm of ugliness...

    2. Re:Show some "unreadable" Perl code or shut up by Neil+Blender · · Score: 1

      Does someone have a good example of unreadable, real world Perl code?

      Complex regular expressions are pretty much the only thing I think can get hard to follow and even those can be broken down and nicely commented. However, in my experience, most people who write decent readable Perl don't break them down.

      Outside of that, Perl is no more readable or unreadable than any other language as long as you have discipline and don't obfuscate just because you can (or because it's easier once you master the language.)

    3. Re:Show some "unreadable" Perl code or shut up by truckaxle · · Score: 1

      You make a good point. I have always wondered why C and C++ have escaped the ugly moniker.

      If given the choice would you prefer to debug badly written C, C++ or perl? Perl is much easier to debug and read because you can easily interrogate it. For example, in perl code at any place I can print out the entire contents of a data structure and learn the hiearchy with something like.

      print Dumper($struct_ref);

      In fact, you can easly print out all the variables and their values in a package (ie name space).

      Perl also has a number of very useful functions such as caller that returns the context of the current subroutine call and even let you get the entire call frames make to the main package.

    4. Re:Show some "unreadable" Perl code or shut up by RyMon · · Score: 1

      This is actual honest to god code the same way I wrote it in the source file.  Not totally unreadable, but it does make a decent argument for perl being ugly. =cP

      while(@_) {
      push @{ $bots{[ sort { @{ $bots{$a}{'Queue'} } <=> @{ $bots{$b}{'Queue'} } } ( $master, grep {    $bots{$master}{'memory'}{'slaves'}{$_}{'type'} eq 'Secondary' && $bots{$master}{'memory'}{'slaves'}{$_}{'status'} eq 'running' } (keys %{ $bots{$master}{'memory'}{'slaves'} })) ]->[0]}{'Queue'} }, shift(@_);
      }

      Keep in mind I'm a huge fan of Perl, and there are some things you can do in perl that you just can't realisticly impliment in many  other languages.  For instance, a modular framework that I'm using for a game server that lets you reload every line of code in the entire program without losing state or dropping a single client connection.  Generally the user never realizes anything happened.

      Great for debugging.  Test something, tweak, kill -s HUP, repeat.

    5. Re:Show some "unreadable" Perl code or shut up by Anonymous Coward · · Score: 0

      Behold! This was part of a project to replace a 'legacy' system but never saw the light for various reasons (scope creep).

      print (quotePrintable(${${$callStk}[$#{$callStk}-$_]}[0] ), ' for ', quotePrintable(${${$callStk}[$#{$callStk}-$_]}[1]) , ' at line ', quotePrintable(${${$callStk}[$#{$callStk}-$_]}[2]) , '
      ',$/);

      There were obviously a few other choice lines, but this one was particularly bad because of the nesting. Perl isn't bad for one-off crap, but beyond that it I refuse to touch it. I've looked at what Perl6 brings to the table... and I'm not impressed.

      As for being able to read code in general: If they follow a typical coding standard, and use whitespace to their advantage, code is readable. It does take training, time, and a strong understanding of hardware and/or API behaviour.

    6. Re:Show some "unreadable" Perl code or shut up by Neil+Watson · · Score: 1
      In fact, my own code looks unreadable and unmanagable if I haven't seen it in awhile.

      Which is why people should always, always comment their code. Yet, how many do?

    7. Re:Show some "unreadable" Perl code or shut up by hahafaha · · Score: 1


      Perl of course!

    8. Re:Show some "unreadable" Perl code or shut up by defile · · Score: 1

      The comments are included in the "unreadable" part.

    9. Re:Show some "unreadable" Perl code or shut up by Abcd1234 · · Score: 1

      I love how everyone's examples are excellent cases of code written by bad *programmers*. Which just proves the point that, like any other language, if you hand Perl to an idiot, you get idiotic code. Why people blame *Perl* for this, though, I'll never know.

    10. Re:Show some "unreadable" Perl code or shut up by onlyjoking · · Score: 1

      Perl isn't bad for one-off crap

      ... like Amazon.com or the Internet Movie Database. So you present an example of badly written code and because it happens to be written in Perl you deduce that Perl is to blame. I think the logic went astray somewhere.

    11. Re:Show some "unreadable" Perl code or shut up by Anonymous Coward · · Score: 0

      Beautiful. The only thing ugly about that is the formatting, or lack thereof. ;)

    12. Re:Show some "unreadable" Perl code or shut up by Anonymous Coward · · Score: 0

      Perl has awful syntax that enables the idiots you speak of.

    13. Re:Show some "unreadable" Perl code or shut up by Anonymous Coward · · Score: 0

      I'm not arguing that it's impossible. The amount of active work on the part of the programmer to maintain maintainability far is more significant that other languages because the programmer has to disqualify a good portion of valid syntax from the perl language. It's like the 'goto' keyword for C. It's not acceptable to use it even though it's perfectly valid syntax.

      The code that I presented, is very simple, but because of *perl syntax* it turned in to utter crap.

    14. Re:Show some "unreadable" Perl code or shut up by Excors · · Score: 1
      my @call = map quotePrintable($_), @{ $callStk->[-1-$_] };
      print "$call[0] for $call[1] at line $call[2]\n$/";
      Only slightly more complex (using map and negative array subscripts), but much more readable - Perl doesn't make it that hard to write nice code.
    15. Re:Show some "unreadable" Perl code or shut up by Anonymous Coward · · Score: 1, Informative

      Well, the think about Perl is it's just a little too hairy. Too much "noise". And some things are weird. For instance, there are two sets of operators, one for numbers, one for strings. What a pain! And you have to remember the difference between lists, arrays, and arrayrefs. Here's a little example. Yes, I know they are both "readable", but the Perl code is slightly less readable and slightly less easy to type. The Ruby code just flows from your fingers while the Perl code requires typing too much punctuations and remembering to load Data::Dumper, and other little annoyances. If you don't "see" the difference, then by all means, stick with Perl. I admit, it's subtle, but I can't imagine going back to Perl after using Ruby.

      Perl:

        my @customers = Customer->find_all;
        my @sorted_customers = sort { $a->name cmp $b->name } @list;
        for my $c (@sorted_customers) {
          print "Customer #@{[$c->id]} has @{[scalar @{$c->acct_a_list}]} A accounts "
                . "and @{[scalar @{$c->acct_b_list}]}\n";
        }
        # debugging
        #use Data::Dumper;
        #print Dumper(\@customers);

      Ruby:

        customers = Customer.find_all
        customers.sort_by { |c| c.name }.each { |c|
          puts "Customer #{c.id} has #{c.acct_a_list.length} A accounts " \
                "and #{c.acct_b_list.length} B accounts"
        }
        # debugging
        #p customers

    16. Re:Show some "unreadable" Perl code or shut up by e40 · · Score: 1
      For instance, a modular framework that I'm using for a game server that lets you reload every line of code in the entire program without losing state or dropping a single client connection. Generally the user never realizes anything happened.

      Users of (Common) Lisp have been doing this for 20+ years. It is the hallmark of a dynamic language. I find it really funny that your world view is so small that you think Perl invented this.

    17. Re:Show some "unreadable" Perl code or shut up by FrostyWheaton · · Score: 1

      Well that is pretty obvious to me. It's printing a compilation error (or something similar) out of a certain level of a call stack. I could tell you more if knew the data, but I don't.

      btw, what part of that is "unreadable"? the only magic operators are the "${...}" construction which dereferences (just like '*' in C/C++/Java/etc) and the "$#..." which gives the index of the last array element. Pretty simple stuff.

      --
      Comments should be like skirts. Short enough to keep your attention, but long enough to cover the subject
    18. Re:Show some "unreadable" Perl code or shut up by RyMon · · Score: 1

      Did you bother to -read- the post? I happen to know lisp (so many parens... ), I said this is something you can't -realistically- do in -many- other languages. Sure it's possible in some other languages, and it's even easy in some. Hell you could do it in C with libs if you really wanted to. That's not the point. Hell that was a side note, and had nothing to do with the actual post. I find it really funny that your world view is so small you feel the desire to make assumptions about what I think or don't think and then ridicule me based on them.

    19. Re:Show some "unreadable" Perl code or shut up by onlyjoking · · Score: 1

      The code you produced and its attendant problems had nothing to do with it being written in Perl. Christ, it didn't even have any indentation. Let's at least lay out the code sensibly before we get into arguments about redundant syntax.

    20. Re:Show some "unreadable" Perl code or shut up by photon317 · · Score: 1


      Regexes do get nasty. They can be broken out onto multiple lines with comments, but then that takes all the fun away. For your enjoyment, here's 3 lovely regexes from some perl code I wrote a few years back. There were for parsing some stuff out of sendmail.cf. Actually sendmail.cf got pre-parsed by some s/// constructs to clean out comments, excess whitespace, etc, before these even touched it, so it could have been even worse:

      /^O(?:(?:\s+AliasFile\s*=\s*)|(?:A\s+))([-a-zA-Z0- 9_\/.,\s]+)/
      /^F(?:(?:{\S+})|\S)(?:-o\s*)?([-a-zA -Z0-9_\/.]+)/
      /^M([^\s,]+),\s*([A-Za-z\/]+=[^,]*( ?:,\s*[A-Za-z\/]+=[^,]*)*)/
      --
      11*43+456^2
    21. Re:Show some "unreadable" Perl code or shut up by Anonymous Coward · · Score: 0

      C is a beautiful, elegant language. How people use it can be quite ugly.

      PERL, the language itself is fugly. Disciplined people can write clean, elegant code in it, but PERL the language itself, there is no adequate word to describe its ugliness ("fugly" don't quite do it).

      Language asethetics is very important in programming - all programming is communication with computers and other programmers, and clarity and conciseness is paramount. It's not a 'matter of taste' and other modern art nonsense. These obfuscation contests, they are meant to be jokes, you know, not something to be proud of.

      (No disagreement with your post, PERL just gives me the seizure for some reason)

    22. Re:Show some "unreadable" Perl code or shut up by spid · · Score: 1

      Oh, the irony... I wanted to reply to this with an especially nasty regexp I wrote back in the day, but my post wasn't going through. The reason given?

      "Lameness filter encountered. Post aborted! Reason: Please use fewer 'junk' characters."

      Guess that about sums things up.

    23. Re:Show some "unreadable" Perl code or shut up by e40 · · Score: 0, Offtopic

      In Perl it's not nearly as easy to do dynamic redefinition as it is in Lisp. Perhaps I'm wrong. Enlighten me.

    24. Re:Show some "unreadable" Perl code or shut up by hahafaha · · Score: 1

      Regexes can be terrible; even the otherwise simple ROT13 algorithm: tr/[A-M][a-m][N-Z][n-z]/[N-Z][n-z][A-M][a-m]/ It's simple but ugly...

    25. Re:Show some "unreadable" Perl code or shut up by firewrought · · Score: 1
      I do have to admit there are some ugly things in Perl. The first thing that comes to mind are regexes.

      I think that's a bad example. Regexes are not not unique to Perl. Every major language/platform has a regex API available to it (including Java, C#, SmallTalk, Python, Ruby, and C). Many include it in the core set of API's for the language.

      It is true that regexes look ugly, but you have to remember that, even in simple cases, a 1-line regex can replace a dozen of lines of normal code. While I'm not generally a fan of sacrificing clarity to get brevity, I can appreciate a 1-2 orders of magnitude reduction in line count, especially when (1) it's accompanied by a similar reduction in debugging time and defects rates, (2) it allows for easy end-user extensibility, and (3) it's a common technique that you can leverage across several tasks, problem domains, and programming languages. These gains make regexes well worth the time you must invest to learn how to use them effectively.

      I would go so far as to consider regexes a fundamental programming skill: if you're a programmer you should know them. If you don't and you are unwilling to spend a month or two learning them, how did you ever spend years learning to read, write, and do mathematics?

      BTW, if you run KDE, take a look at kregexpeditor, which permits you to edit regexes in a friendlier fashion. KDE program are starting to embed this tool for use with their find functionality... a very slick way to make this mini-language accessible to a wider audience.

      --
      -1, Too Many Layers Of Abstraction
    26. Re:Show some "unreadable" Perl code or shut up by Chandon+Seldon · · Score: 1

      Now take both and change them so they sort by the first letter of the second word in the string...

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    27. Re:Show some "unreadable" Perl code or shut up by kwoff · · Score: 1

      For what it's worth, I also immediately thought of Lisp after reading your original comment.

    28. Re:Show some "unreadable" Perl code or shut up by kwoff · · Score: 1

      I'd normally write

      print "Customer #@{[$c->id]} has @{[scalar @{$c->acct_a_list}]} A accounts "
      . "and @{[scalar @{$c->acct_b_list}]}\n";

      as (though indented...)

      printf "Customer #%s has %s A accounts and %s\n",
      $c->id, scalar(@{$c->acct_a_list}), scalar(@{$c->acct_a_list});

      The problem of `length' not working as you'd expect it to on lists is supposed to be fixed in perl 6. Maybe Ruby and Perl 6 won't be very different syntaxically. There's a big difference between the two in terms of community and history, however. So I think it ultimately comes down to choosing which community you want to belong to.

    29. Re:Show some "unreadable" Perl code or shut up by Anonymous Coward · · Score: 0

      that's not ugly.. that's beautiful!

    30. Re:Show some "unreadable" Perl code or shut up by Anonymous Coward · · Score: 0

      Heh. I always feel a bit guilty when I've ended up producing code like that. If it also involved the use of map{}, I've sometimes even apologized in the comments preceding the code block...
      You can make things like that a hell of a lot more readable simply by using line breaks and indentation, though.

  26. You mean slashdot isn't based in Poland? by rebug · · Score: 2, Funny

    Yow!

    --

    there's more than one way to do me.
  27. Re:Clarity by cperciva · · Score: 0

    Perl is designed to mimic many aspects of natural language

    I suppose that if you're a modem, Perl might look like natural language to you. To the rest of us, it is questionable whether it can be called a language at all (isn't the essence of language the trait of facilitating communication?), and it certainly isn't a natural language.

  28. Re:Perl 9 is already out... by Anonymous Coward · · Score: 0

    unneccecary

    Spelling Nazi says: Any perl script to fix that one please? :)

  29. No, there isn't. by jbellis · · Score: 1, Troll

    Python gives you the power and expressiveness of perl, but with actual design principles behind it.

    Perl vs Python is sort of like MySQL vs PostgreSQL: each of the former was once useful, but now there's an alternative that is so much better, why handicap yourself? /one of many former perl users since moved to python

    1. Re:No, there isn't. by shellbeach · · Score: 1

      Python gives you the power and expressiveness of perl, but with actual design principles behind it.

      Just as Perl gives you the power and expressiveness of Python, but with more freedom to code the way you want, rather than the way some whitespace fanatic wanted? ;-)

      I don't think I've ever met someone who liked coding in both Python and Perl. Thankfully, having both around doing fabulously doesn't hurt anyone :)

    2. Re:No, there isn't. by chromatic · · Score: 1
      Python gives you the power and expressiveness of perl, but with actual design principles behind it.

      Just because you don't understand how Perl applies its design principles does not mean that they do not exist. (You used a pronoun correctly in English, so you already know at least one of them in another context.)

    3. Re:No, there isn't. by cloudmaster · · Score: 2, Insightful

      So, did you switch because you never learned to use perl effectively, or because you're such a crappy programmer that you couldn't remember to use a good coding style unless the compiler barfed when you made a mistake? :) Seriously, perl can be complicated, as there's a lot to learn...

      Yes, I'm quite familiar with Python. I prefer perl. My code looks good because I know how to program, not because the language forces me to indent. Changing the name of a hash to a dictionary, an array to a list, and making a distinction between read only arrays and read-write arrays does not make a language better. Replacing semicolons with newlines doesn't make a language better. Removing the ability to coerce types when appropriate doesn't make things better (if I want to treat a number as a string, I shouldn't have to make a big deal about it in a scripting language).

      Granted, I have less experience with python thatn with perl, and that drives lots of my preference. But the only thing I've found better about python is the method documentation scheme. That's marginally neat. Then again, I comment my code in perl, and it works fine.

      Ignoring my rather facetious comment at the beginning, can you actually give me an example of something python does better than perl, other than really large programs (which I don't think python is all that great for, either) or converting otherwise sane people into frothing zealots? ;)

    4. Re:No, there isn't. by chthon · · Score: 1

      I do both.

      I code in Perl because I am obliged (platform consistency at my employer), I code in Python because of Zope, but I really would like to code in Ruby only (Common Lisp or Scheme I like too, but I there are too many libraries missing).

    5. Re:No, there isn't. by chthon · · Score: 1

      Seriously, perl can be complicated, as there's a lot to learn...

      Last year I dug a couple of months into Scheme and Common Lisp.

      I could apply all the ideas that were in those languages in Perl.

      If you have a look at CL2, then you will find that a whole lot of the things that are explained there can be implemented in Perl.

      So, I think that learning Perl is not a matter of complexity from the language, but from the features that you can use. You can start real simple, using Perl for simple scripting, but you can grow with Perl for complex classes and applications.

      I even did complex macro's in Perl. You need to write your macro code as a string, which needs then to be eval'ed at run-time. Nice feature to implement class templates.

      The only thing that really sucks is the dereferencing and the curly brackets. I take COBOL (or even PL/1) any time to define and reference record types.

    6. Re:No, there isn't. by shellbeach · · Score: 1

      I do both.

      Note: I said like, not do :) Sure, most are going to have to play with both, but it doesn't mean that you're going to enjoy it!

    7. Re:No, there isn't. by cloudmaster · · Score: 1

      The only thing that really sucks is the dereferencing and the curly brackets

      That's why I use the arrow operator when possible. I think it makes the code more leigible. If $pie is a reference to an array full of hashrefs, then $pie->[0]->{key} just looks much cleaner than ${${$pie}[0]}{key}. So long as you don't use pointers to pointers (which is generally a good thing in a language like perl, where you aren't supposed to ever worry about how memory's allocated), at worst, you just have to use one set of outer braces to typecast something, which seems perfectly reasonable to someone who uses parens for disambiguity anyway.

      Maybe that's my C background talking, though. :)

    8. Re:No, there isn't. by jonadab · · Score: 1

      > Python gives you the power and expressiveness of perl, but with actual
      > design principles behind

      Yeah, and the primary design principle is, "There's One Best Way To Do It", and woebetide anyone who wants to use a different approach. Heaven forfend I should want to solve a particular problem with the paradigm it best lends itself to, if that paradigm doesn't happen to be the one Guido thinks is best for all problems.

      This philosophy is so pervasive in the Python community that it leaks over into software that's written in Python, infecting it in some cases with a distinct lack of flexibility and an unwillingness to let the user do things the user's way. Mailman, for instance, will not let a user subscribe to both individual messages and also digests, because the guy who wrote it decided that was not the most elegant way to do things. The Perl community dislikes this sort of arrogance. (We have, instead, our own form of hubris... the belief that our ways of doing things are good enough to show to the world, even if they're not the most popular. Hence the CPAN.)

      In short, there are major *cultural* differences between Perl and Python. The differences in the languages themselves either result from the cultural differences (in the language designers) or result in the "right" sort of people gravitating toward each language and thus each language's community -- probably both.

      I tried Python, but I determined that it's not for me. Perl is for me. Lisp is for me. At some point I want to try Ruby and see if maybe that's for me too. But Python is not.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    9. Re:No, there isn't. by chthon · · Score: 1

      I do the same.

      But being able to say

      $pie[0].key

      is nicer than

      $pie->[0]->{key}

    10. Re:No, there isn't. by cloudmaster · · Score: 1

      I dunno - I think it's a good idea to explicitly dereference pointers, rather than relying on the language to do what I mean. In a simple example, If $pie is a reference to a scalar, and I do $tmp = $pie, then how does the language automatically tell if I want to assign the scalar referenced or the refeference itself to $tmp? The programmer has to know a little aobut what's being written. In the cases where you the programmer don't always know if you have a reference or a native type, there's the ref() method and an if/switch statement.

  30. Re:Are people still using PERL? by Lost+Found · · Score: 2, Informative

    Actually, mod_perl performance beats the pants off everything but raw C modules when doing Apache web applications.

  31. Re:Perl: Lead Painted Asbestos Toys for Tots by Anonymous Coward · · Score: 0

    Yep, no proof or substantiation.

    This is what passes for "insightful" on Slashdot these days.

  32. Wand Ad by Anonymous Coward · · Score: 1, Funny

    WANTED: RUBY DEVELOPER

    Willing to take anyone who knows the the difference between the scripting language and the gem. Must be willing to relocate to Bumfark, IA. Must agree that anyone not using Gentoo is a luddite. Send resumes in LaTeX to...

    1. Re:Wand Ad by utopianfiat · · Score: 0, Offtopic

      Complete fucking luddite. When do I start?

      --
      +5, Truth
    2. Re:Wand Ad by Anonymous Coward · · Score: 0

      Surely that should have read

      \begin{document}
      \emph{Complete} fucking \texttt{luddite} \cite{luddite}
      \end{document}

      ??

  33. Re:Are people still using PERL? by hahafaha · · Score: 3, Informative
    This is very far from the truth. Perl is still used heavily for many things ranging from games to CGI.
    I thought it was a passe fad like Java.

    The same goes for Java.
    Seriously, doesn't it remain too slow in execution spped ... and the quick knock off jobs you can do with it are better done in bash and awk?

    Bash and Awk are not powerful enough to do some of the jobs Perl can do. And Perl is only slow with some things, and in comparison to really serious languages like C/C++.
  34. try both by Anonymous Coward · · Score: 0

    try to figure out some small parts of your program you want to redo. then try doing 1 or 2 in ruby and another couple in python. then you can figure out which you like better.

  35. Re:Perl 9 is already out... by Anonymous Coward · · Score: 0

    s/(nec)c(e)c(ary)/$1$2ss$3/

    Anything else?

  36. Perl6 is closer than you think by jjn1056 · · Score: 4, Informative

    check out "http://pugscode.org/"

    for a working perl6 compiler. Yeah, it is not yet feature complete, but progress is very rapid.

    Perl6 is really amazing. It removes most of the worst parts of perl5 and make things even easier on the programmer. If you do an research at all you can find that.

    Some people are even starting to port important CPAN modules to perl6 and discovering how much a pleasure it is to use.

    see http://www.perl.com/pub/a/2005/07/28/test_builder_ p6.html

    as an example of that.

    btw, check out the example code. for all of you who think perl5 looks like static on a tv screen, you will be pleasantly surprised I think.

    peace

    --
    Peace, or Not?
    1. Re:Perl6 is closer than you think by A+beautiful+mind · · Score: 1

      say "I for "_++$one_", welcome our Perl6 overlords."

      (P.S.: the "say" function is a new thing in Perl6)

      --
      It takes a man to suffer ignorance and smile
      Be yourself no matter what they say
    2. Re:Perl6 is closer than you think by njchick · · Score: 1

      Maybe you also have an URL for Duke Nukem Forever?

    3. Re:Perl6 is closer than you think by Anonymous Coward · · Score: 0

      Actually, is should be say "I for "~++$one~", welcome our Perl6 overlords." these days.

  37. For the fanatic by DysenteryInTheRanks · · Score: 2, Insightful
    The review concludes by saying the book is "a fun read for the Perl fanatic." So post that review on Perl.com and tell us here on Slashdot why any non-fanatical programmer would want to use a half-baked imitation of an unwritten language.

    I love and use Perl. But the grammar is already rich and varied. Throwing incorrect Perl6 code into the mix is going to make Perl5 code even harder to read. I sure hope not too much of this stuff makes it onto CPAN (although I know some of it already has).

  38. Perl by Cytlid · · Score: 1

    Umm... to all the naysayers... wonder why netcraft says slashdot.org uses mod_perl? (sarcasm, no need for -5, Obvious).

    I for one, welcome our perl-loving overlords. (and the book, too!)

    --
    FLR
    1. Re:Perl by doom · · Score: 1
      Umm... to all the naysayers... wonder why netcraft says slashdot.org uses mod_perl? (sarcasm, no need for -5, Obvious).
      I think a better question is what's up with technocrat.net. Bruce Perens brought it back to life, only now it's running on slash. The old one was a Zope site, as I recall... It couldn't be that moldy old Slash is better than a nifty Python project, could it?
  39. Re:Perl: Lead Painted Asbestos Toys for Tots by Anonymous Coward · · Score: 0

    I read alot of opinion and FUD, but where is this proof and backup you speak of?

  40. What annoys me is by tod_miller · · Score: 1

    Perl users are happy when it gets used for EVERYTHING and anything, its like, shit, I have spent all this time learning, now I want every technology to be doable in Perl! 3d, yes, internet sites, yes, databases, yes, write one in perl. operating systems, yes, write one in perl!

    PERL is very scripty and cgi'y. I used PERL (sorry perl) while doing some basic CGI about 6/7 years ago.

    Never used it since. Have used PHP since... don't use either. All Jsp, Java SE, JSF and Python now.

    --
    #hostfile 0.0.0.0 primidi.com 0.0.0.0 www.primidi.com 0.0.0.0 radio.weblogs.com
    1. Re:What annoys me is by Anonymous Coward · · Score: 0

      Actually, the correct spelling is 'Perl'.

      "PERL" is a backronym...

    2. Re:What annoys me is by Frank+T.+Lofaro+Jr. · · Score: 1

      I want a Perl interpreter in Perl!

      --
      Just because it CAN be done, doesn't mean it should!
    3. Re:What annoys me is by Darmox · · Score: 1

      That, uh, is the final plan for perl 6; to be written in perl 6.

      It'll compile to parrot bytecode.

      Of course, if you just want to mess with perl 6 before it's (completely) written in perl 6, hit Pugs.

      --
      If I was that drunk, I would have remembered it -- H. Simpson
    4. Re:What annoys me is by tod_miller · · Score: 1

      Wrong, PERL was the original, and became Perl as a rebranding, and people confuse this with it being a backronym. Practical Extraction & Reporting Language.

      Same with PHP in fact.

      --
      #hostfile 0.0.0.0 primidi.com 0.0.0.0 www.primidi.com 0.0.0.0 radio.weblogs.com
    5. Re:What annoys me is by chromatic · · Score: 1

      Even famous designers of other languages get that wrong. I've heard Larry Wall claim that the creator of Perl first thought about naming it after his wife, then chose "Pearl" before dropping the "a". Talk about confused!

    6. Re:What annoys me is by hostyle · · Score: 1

      Perhaps you need to write yourself a sense of humour in perl :) Its clear Larry already has one.

      --
      Caesar si viveret, ad remum dareris.
    7. Re:What annoys me is by chromatic · · Score: 1

      Well a less subtle sense of humor anyway...

  41. I used to use Perl, now I'm only doing RoR by duffbeer703 · · Score: 5, Funny

    Ruby on Rails blows away Perl. I used to code in Perl, but I was working on re-implementing Windows XP as a Firefox extension, and I just wasn't getting the productivity that I wanted out of Perl.

    So I switched to Ruby on Rails this morning, and I'm so productive, that its sick. Within 5 hours, I have a Firefox extension running on my AIX workstation that can run most Win32 software... Photoshop, Outlook and Half Life 2 work ok, although I only get 40fps with HL2. (I'm working on that)

    After dinner I'm going to reproduce every module in the CPAN library, which I estimate will take approximately 2.25 hours. I can't wait!

    --
    Conformity is the jailer of freedom and enemy of growth. -JFK
    1. Re:I used to use Perl, now I'm only doing RoR by Anonymous Coward · · Score: 0

      Actually you'll find that the RoR framework already provides this for you. Try including this mixin:

      module CPAN
          implement_cpan :with_future_modules => true
      end

      PS: Great post

  42. Perl's only real advantage is job security by SimHacker · · Score: 0, Flamebait
    Perl is great for desparate low-skill sysadmins who need to extort their employers into keeping them on because nobody else can decypher their code.

    If that's your problem, then you should instead improve your skill set by learning better languages, instead of digging yourself deeper into the grave with Perl.

    There are good reasons why people shouldn't fill airships with hydrogen, paint walls with lead paint, kill bugs with DDT, insulate homes with asbestos, glow watch faces with radium, treat medical problems with leaches, and develop software with Perl.

    All of those technologies seemed to be a good idea at the time, but they turned out to have long term unforseen consequences. Now that the consequences are understood, it's criminal to continue using those technologies.

    If you don't understand Perl's problems, then you certainly shouldn't be using it. If you don't think it has problems, then you're dead wrong, and should educate yourself.

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
    1. Re:Perl's only real advantage is job security by winkydink · · Score: 1

      Still no backup or rationale, just broad generalizations and a weak attempt at, "I'm way smarter than you."

      You may be, but if this is your attempt at clarifying, it does little to prove it.

      --

      "I'd rather be a lightning rod than a seismometer." -Ken Kesey

    2. Re:Perl's only real advantage is job security by Anonymous Coward · · Score: 0
      If you don't understand Perl's problems, then you certainly shouldn't be using it. If you don't think it has problems,...

      If you do understand Perl's problems, then you'll be looking forward to Perl6. If you don't understand Perl's problems, you can still get alot of useful work done.


      And since Python is likely to be implemented on Parrot before Perl is, it won't matter which useful language you use in the end.

  43. Re:Here you go... by hahafaha · · Score: 1

    He said that it can't be obfuscated perl contest. The thing you gave comes from here which is the second place winner of the 5th anual perl obfuscated contest...

  44. DUDE YUO ARE A MORAN! by Anonymous Coward · · Score: 0

    I'm arguing in favor of the Python with my clean, readable, efficnet codes!

    Look at teh PERL, it's all $_(OMG)$#WTF['B']{B}.Q(!), so($Lame!)

  45. Contrarian View by Anonymous Coward · · Score: 2, Insightful
    PERL5 is already sufficient. Going beyond sufficiency will destroy the language.

    PERL5 is (relatively) compact. It does what it needs to do. I can quickly write fast and compact programs to do dirty tasks like extracting data from a log file. Moreover, I can easily decipher another person's PERL program.

    Attempts to bloat PERL to include every conceivable widget is little more than an ill-advised attempt to morph PERL into a full-blown development language (e.g. C#) for creating million-line programs. Does anyone remember PL/1? It was supposed to be the be-all/end-all language and incorporated so many bells and whistles that few programmers actually learned how the entire language worked.

    Remember the wisdom of the ancients: bearded, graying, almost senile UNIX programmers wearing code-bottle-thick eyeglasses. KISS means "Keep It Simple Stupid".

    1. Re:Contrarian View by John+Bokma · · Score: 1

      Funny how so many people think they can say something about Perl but don't know it's written Perl (for the language *) and not PERL (since it's not an acronym). * and perl for the program

  46. Help Me Here... by Anonymous Coward · · Score: 0

    The more I read about Perl, the more and more I want to learn Python. I know neither at the moment, but I am an IT security guy with 8 years experience. I know unix, linux, Mac OS, and of course, Windows. I need something that runs on *all* platforms and that can be used to parse complicated log files and security scans into human-readable text that can be further massaged in a DB, most likely Access. (Don't grumble about MS Access, as I don't have a choice in the matter.)
    Additionally, I would like to be able to write a GUI for this parsing that is simple and elegant. Since I need to learn this language and do rapid development, which would be easiest to grasp and learn.

    1. Re:Help Me Here... by hahafaha · · Score: 1
      I need something that runs on *all* platforms

      Perl can do that
      can be used to parse complicated log files and security scans into human-readable text that can be further massaged in a DB, most likely Access.

      Perl's specialty
      Additionally, I would like to be able to write a GUI for this parsing that is simple and elegant.

      Perl/TK can do that for you
      Since I need to learn this language and do rapid development, which would be easiest to grasp and learn.

      I think Perl is.
    2. Re:Help Me Here... by Anonymous Coward · · Score: 0

      You could always do..oh, that's right, Perl. It does all those things, and it's sick efficient, once you know how to write it.

    3. Re:Help Me Here... by Sweetshark · · Score: 1

      Since I need to learn this language and do rapid development, which would be easiest to grasp and learn.
      If you are starting something new use Python.
      that can be used to parse complicated log files and security scans
      This is traditional Perl terrain because Perl is more or less Regexps and a little bit around it. However, in Python you can use regexps aswell and the stuff around it is much cleaner and easier to "grasp and learn". Perl has the motto "there is more than one way", which makes fast hacks easier and big projects and reading of other coders stuff harder. Contrast that with the Zen of Python: http://www.python.org/doc/Humor.html#zen
      As for GUI-Stuff. TkInter is a very easy to use standard GUI in Python. Of cause there are also bindings to other crossplatform toolkits like GTK and WxWindows. The more I read about Perl, the more and more I want to learn Python.
      Your gut-feeling is right there.

    4. Re:Help Me Here... by dhasenan · · Score: 1

      Writing Perl isn't a problem.

      Reading Perl is a problem, when you're learning it. Reading Python is easier than reading C.

      The grandparent is looking for a fast solution--one that he doesn't have to spend a lot of time on. Debugging something that looks like line noise isn't easy, especially since his experience is probably focussed on C-style syntaxes. So it's probably better in his case to use Python.

      If you're implementing a large-scale program that involves heavy text manipulation, then you'll want to use Perl. But this project isn't a major thing--it's just there to automate a portion of a sysadmin's work.

    5. Re:Help Me Here... by arevos · · Score: 1

      Well, as with everything, it depends :)

      Both Perl and Python are multiplatform.

      Both Perl and Python can use the GTK, Qt and Tk GUI toolkits. Perl and Python only have support for Qt3, so there's no GPLed Windows version of Qt for these languages. Tk's always struck me as ugly, so GTK seems the best choice. It's what Bittorrent uses.

      Bittorrent used to use wxPython, a python wrapper around wxWindows, another GUI toolkit. Though wxWindows has always seemed a bit flaky to me.

      Both Perl and Python have ODBC modules, which I believe allows a program to interface with MS Access.

      Perl has native regular expressions, whilst Python supplies a regular expression module in the standard Python download. If you're using a lot of regular expressions, Perl's syntax is more concise than Python's.

      Personally, I tend to prefer Python to program in. It seems cleaner, neater, and easier to remember than Perl. I almost always choose Python over Perl in any project.

      That said, a lot depends on your personal preference. Perl seem more 'hacky' than Python (I leave it up to the reader whether that is a good or bad thing), but both languages will do exactly what you want, so there's little to choose between them.

    6. Re:Help Me Here... by Anonymous Coward · · Score: 0
  47. Re:Here you go... by Anonymous Coward · · Score: 1, Insightful
    @P = split//, ".URRUU\c8R";
    @d = split//, "\nrekcah xinU / lreP rehtona tsuJ";
     
    sub p {
        @p {"r$p", "u$p"} = (P, P);
        pipe "r$p", "u$p";
        ++$p;
        ($q *= 2) += $f = !fork;
        map {
            $P = $P[$f^ord($p{$_})&6];
            $p{$_} = / ^$P/ix?$P:close$_
        }
     
        keys %p
    }
     
    p;
    p;
    p;
    p;
    p;
    map {$p{$_} =~ /^[ P.]/ && close $_} %p;
    wait until $?;
    map{/^r/ && <$_>} %p;
    $_=$d[$q];
    sleep rand(2) if /\S/;
    print
    Whitespace helps a bit. Not having subroutines and variables named the same thing might help too. I don't see how you proved anything with this crap, because anyone can write shitty looking, hard to understand code in any language if they don't use whitespace or decent variable names.
  48. Re:Perl: Lead Painted Asbestos Toys for Tots by Anonymous Coward · · Score: 3, Funny
    It's simply irresponsible and foolish to use Perl.

    Every time you post a message to this website, you're using Perl. You'd better stop before you foolish irresponsible behavior catches up with you.

  49. Re:It's a php/perl post! by Lost+Found · · Score: 1

    Personally, I go the Amazon.com route and use mod_perl for the environment, HTML::Mason for the templating, my own guruism for a layer in between the two, and CPAN to integrate with every known computer system and protocol under the sun.

    And it's oh-so-nice after days of dealing with people's Java bullshit to see *my* pages render .1 seconds after the click.

  50. Re:Here you go... by Anonymous Coward · · Score: 0

    And which "real world" do you use that code in?

  51. Re:Are people still using PERL? by Lost+Found · · Score: 1

    And in the places where C is substantially faster (say, complex math), Perl's XS layer gets utilized by programmers to create C bindings which are then published on CPAN, allowing Perl to continue to operate like lightning.

  52. PS: Patch is still the leading product. by Anonymous Coward · · Score: 0

    (for the uninformed)

  53. Re:Perl 9 is already out... by Proc6 · · Score: 0, Troll

    Cripple Fight!!!!

    --

    I'm Rick James with mod points biatch!

  54. YES YES YES!!! by Banner · · Score: 0, Troll

    Oh you are so completely right! I hate the fact that they keep trying to make Perl something it isn't: A programming language. Do we really need all the migration pains again? Perl 5 broke all of the Perl 4 scripts. Perl 6 will undoubtedly do the same.

    Why? Will there be any benefit? No, none at all.

    Somebody needs to take Perl away from Larry. We don't need to relearn this language for the 6th time!! (or 7th like me if you played with it's predecessor). It's stupid, it's pointless.

    We need to start a 'Save Perl from Larry Wall' foundation or something.

    1. Re:YES YES YES!!! by A+beautiful+mind · · Score: 1

      What's stopping you from continuing to use Perl5 after Perl6 is out? Nothing...

      --
      It takes a man to suffer ignorance and smile
      Be yourself no matter what they say
    2. Re:YES YES YES!!! by Anonymous Coward · · Score: 0

      Parrot will run Perl 5 scripts, duh. It's called Ponie.

    3. Re:YES YES YES!!! by Banner · · Score: 1

      Other than most places will pull support? Just like they did for Perl 4 when 5 came out?

    4. Re:YES YES YES!!! by Anonymous Coward · · Score: 0

      I've stopped even trying to use *any* software done in Perl. Just installing any of them is such a pain - there are always dependencies on some other modules that are not all available in one place, not to mention each of those dependencies (when you do get them), installing into /usr/lib/perlX/5.x.y or 5.x.z or 5.x.a. Maybe it's just me, but I've never got a Perl based program with dependencies to work without a lot of pain.

    5. Re:YES YES YES!!! by amightywind · · Score: 1

      What's stopping you from continuing to use Perl5 after Perl6 is out? Nothing...

      Great solution; typical slashdot advice. I can hardly wait for Perl7, Perl8... Retard.

      --
      an ill wind that blows no good
    6. Re:YES YES YES!!! by crucini · · Score: 1

      I can't tell if you're kidding. At the risk of not getting the joke: install the CPAN module. Type "perl -MCPAN -eshell". Then type "install Foo::Bar". It will handle all the dependencies.

  55. ACHOO by ciroknight · · Score: 1

    ...Bless you. Do you need a hanky to clean up that mess?

    --
    "Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
  56. Catalyst by Anonymous Coward · · Score: 0

    I have used Rails and Catalyst. IMO because of the Catalyst dev team's use of mature CPAN modules and the stability of mod_perl over mod_ruby Catalyst will scale better.

  57. about package statement by guacamole · · Score: 2, Interesting

    So, what happens if I use perl6 to run a script that has neither "package" nor "class" statements in it. How is it going to decide which language is that?

    1. Re:about package statement by chromatic · · Score: 1

      It's Perl 6 code, of course. package marks code as Perl 5. Everything else is Perl 6.

    2. Re:about package statement by guacamole · · Score: 1

      So, what if I have Perl 5 code without package statement.

    3. Re:about package statement by chromatic · · Score: 2, Informative

      Then run it with Ponie or your existing Perl 5 compiler, or add package main; at the start if you change your hash-bang line to /usr/bin/perl6 instead of /usr/bin/perl.

      The point of the check is to re-use modules, not standalone scripts, so that you can migrate your code to Perl 6 gradually.

  58. Why is Perl so hated? by Lost+Found · · Score: 4, Insightful

    I've been asking myself a lot lately why so many people seem to hate Perl. After spending the last few years going from comfortably familiar to extremely familiar with the syntax and features, I think I have the answer.

    When you really get down into the guts of perl, you get to do all kinds of crazy nifty things with XS, AUTOLOAD, regular expressions, etc. Perl's syntax is such that once you're intimately familiar with it, you can be either very expressive or very concise.

    A lot of code ends up going the concise route because when you know what you're doing, it's easier to write (less keystrokes). Then perl newbies / passer-byers take a look at it, don't understand it, and freak out and say that perl is crap.

    Then perhaps they're threatened because there's a huge community of smart perl programmers that manage to upstage them constantly.

    To zoom out on the issue a bit, I'm really sick and tired of this current movement in computer science where so many think that programming should be made into some kind of simple task that anyone can do. Hence you end up with languages like Java that hold your hand really really tight and refuse to let go. Is Grandma writing software really a good thing? Or should we save it for the people who at least have a passing familiarity with computers & networks; hell, someone who might even know a little bit about the basic mechanisms in a typical UNIX kernel?

    (I refuse to drive a car built out of legos... I don't care that the technology enabled your three year old to do it... it's a high speed highway, damnit, and my life is on the line!)

    Make no mistake - there's still an undergound of brilliant developers that understand their systems inside out and produce amazing, high performance code. Many of them are in the open source community. And we refuse to let go of our power tools. You may use whatever language you like, but expect a well-deserved ass kicking if you get in our face and try to tell us you know better.

    1. Re:Why is Perl so hated? by rihjol · · Score: 1

      To zoom out on the issue a bit, I'm really sick and tired of this current movement in computer science where so many think that programming should be made into some kind of simple task that anyone can do. Hence you end up with languages like Java that hold your hand really really tight and refuse to let go. Is Grandma writing software really a good thing? Or should we save it for the people who at least have a passing familiarity with computers & networks; hell, someone who might even know a little bit about the basic mechanisms in a typical UNIX kernel?

      I think part of the issue is that speed/time-to-market is taking precendence over quality. People can use "modern" tools to punch things out more quickly, even if they don't understand what's going on behind the scenes. Things like VB, for example, where you can create quite a lot without having a good understanding of coding and algorithms and such. However, when a real tough problem comes along, the people who rely on the tools instead of innate knowledge, will fall short.

      --
      I like bread.
    2. Re:Why is Perl so hated? by learn+fast · · Score: 2

      A lot of code ends up going the concise route because when you know what you're doing, it's easier to write (less keystrokes). Then perl newbies / passer-byers take a look at it, don't understand it, and freak out and say that perl is crap.

      Fewer keystrokes should not be a design goal of a language. Do you remember the first time you wrote a C program, and you named your first variable 'a', your second 'b', until you got up to say, 'l' or so, and then you realized that you saved a lot of keystrokes but it was impossible to tell what your program was doing. Then after that you got smart and started to give your variables descriptive names. The extra time you spent typing was less than the time you saved when trying to understand what the program was doing upon a later reading.

      Somehow perl never learned this lesson.

    3. Re:Why is Perl so hated? by Lost+Found · · Score: 1

      To some degree, that's probably true. And certainly, the trend of abandoning quality in favor of time to market is deeply rooted in the commercial software enterprise (which is why you end up with so many disasters in that arena).

      Speaking specifically of perl, though, it's very possible to rapidly prototype and deploy applications if you know what you're doing. Last year, a colleague and I picked up HTML::Mason and inside of two weeks wrote a robust Voice-over-IP portal that far surpassed the available competition in terms of functionality. It wasn't quite production quality when it hit the tradeshow floor, though it was damn close, which is very respectable given the deadlines and the fact that it was the first time either of us had ever done any kind of serious work with HTML::Mason or Asterisk.

      To continue on the story a bit, the 'competing' portals included with many high-end commercial VoIP PBXs seem almost exclusively implemented in Java, and it hurts -- even over our office LAN, their portals still feel very slow (and they're running on very respectable Sun hardware that otherwise spends its life idle). Our portal, on the other hand, responded to page clicks so fast you would think it was a dual xeon serving static pages off a 7-spindle RAID array.

      The bottom line is that quality only seems to matter to smart people... the rest of the world will happily eat shit if you put it on a bun, and even after the health problems, they'll come right back for more.

    4. Re:Why is Perl so hated? by Anonymous Coward · · Score: 0

      Completely untrue. You can write very readable, ridiculously understandable, long-winded Perl code to your heart's content. That's what newbie programmers do.

      More knowledgable ones have a greater understanding of the syntax and can use reasonable shortcuts in readability. If you can't read someone else's code, there's only one reason -- you're not at the same level of ability as the coder.

      Which one of you is higher, well, that's up for debate. But don't blame the language when it's completely flexible on this point.

    5. Re:Why is Perl so hated? by Anonymous Coward · · Score: 1, Funny

      $rant = "And we refuse to let go of our power tools. You may use whatever language you like, but expect a well-deserved ass kicking if you get in our face and try to tell us you know better.";

      $rant =~ s/ass kicking/girly slapping/;

      Programmers are intimidating.

    6. Re:Why is Perl so hated? by Sweetshark · · Score: 3, Insightful

      Then perl newbies / passer-byers take a look at it, don't understand it, and freak out and say that perl is crap.
      And in a way they are right: Perl is crap for RAD by now compared to other languages.
      Then perhaps they're threatened because there's a huge community of smart perl programmers that manage to upstage them constantly.
      Yeah, the zealots and their praises are probably one the main reason for the hate against perl. Its just not that good as the zealots claim. Thus people are disappointed.
      To zoom out on the issue a bit, I'm really sick and tired of this current movement in computer science where so many think that programming should be made into some kind of simple task that anyone can do.
      That sounds so elitist it hurts. But yes, programming should be as easy as possible, but not easier.
      Hence you end up with languages like Java that hold your hand really really tight and refuse to let go. Is Grandma writing software really a good thing?
      Grandma uses VisualBasic or PHP, but not Java. Oh, and its a lot better when Grandma writes software in Java than in PHP or Perl.
      Or should we save it for the people who at least have a passing familiarity with computers & networks; hell, someone who might even know a little bit about the basic mechanisms in a typical UNIX kernel?
      No. Your Perlcode might even run on a Non-UNIX System - this is one of the reasons to use Perl, Python, Ruby or Java.
      ... it's a high speed highway, damnit, and my life is on the line!
      So you prefer to use a very powerful old car without any safety measures, because "you can handle it". Yeah, right.
      Make no mistake - there's still an undergound of brilliant developers that understand their systems inside out and produce amazing, high performance code. Many of them are in the open source community. And we refuse to let go of our power tools. You may use whatever language you like, but expect a well-deserved ass kicking if you get in our face and try to tell us you know better.
      Uhhh, Im scared. You really remind me of this guy: http://www.pbm.com/~lindahl/real.programmers.html

      Those who live by the sword get shot by those who don't.

    7. Re:Why is Perl so hated? by sevinkey · · Score: 1

      I'm with you there. I think perl is great as a scripting language. I strongly prefer strongly typed languages for system development, although I wish one of them handled regular expressions with the elegance of perl.

      All of my complaints with Perl are really complaints with scripting, and 'use strict' and packages really take care of most of that.

    8. Re:Why is Perl so hated? by Anonymous+Crowhead · · Score: 2, Insightful

      If you code like you respond to comments, I bet your code looks like crap in any language.

    9. Re:Why is Perl so hated? by Anonymous Coward · · Score: 0

      Maybe Slashdot should enforce whitespaces?

    10. Re:Why is Perl so hated? by chromatic · · Score: 2, Interesting
      Fewer keystrokes should not be a design goal of a language.

      Your objection is silly and I think it's because you focused on variable names at the expense of what Perl really tries to optimize, Huffman-wisee. The driving question of Perl (and especially Perl 6) design here is "Why should common operations require a lot of syntax?" In English, why should words such as "he", "she", "I", "you", and "it" be short instead of long? Why is say a better keyword to print a string with a newline attached than print_with_newline?

      One answer is to let meaningful identifiers stand out more.

      Granted, there are tradeoffs. I've seen the Sieve of Eratosthenes in APL and it's fairly dense -- but somehow good people get by with learning a little bit of notation. (The waterbed theory of complexity applies here too).

    11. Re:Why is Perl so hated? by HorsePunchKid · · Score: 2, Insightful
      I hated Perl because it sat in the festering wasteland between shell scripting and full-blown compiled languages. Why would you want the complexity of C++ with the functionality of Bash? I learned the basic syntax about seven or eight years ago and decided there was no place for Perl in my toolbox. Not for lack of room; it just wasn't worth knowing.

      Of course it turned out that I was competely wrong. I was sitting down to dinner with a friend, and he was going on and on about all the different ways the various brackets and braces and parentheses are interpreted in different contexts in Perl. It was actually very interesting in a morbid sort of way; like how your eyes fixate on the wreck on the other side of the highway.

      Then my friend pointed out the simple joy of perl -ne '...'. This little construct kindled something in the back of my mind, and I knew when I got back to my computer that I'd have myriad uses for it. All of those things that I used to do with huge series of commandline pipes and the occasional chunk of Java could be compressed down into one line. One totally illegible and unreusable but completely accurate line.

      find . -name \*.m3u | perl -n -e 'chomp; ($dir=$_)=~s/[^\/]*$//; $play=$_; $bad=0; open(PLAY, "> $_"); while(<PLAY>) { chomp; s/\r//; if(/^[0-9].\. / || /^[0-9]. - / || !/mp3$/) { $bad=1; warn "Ignoring $play\n"; last; } rename($dir.$_, $dir.($. $.. $_\n"; } close(PLAY); if(!$bad) { opendir(DIR, $dir); @files=grep { /^[0-9].\. / } readdir(DIR); closedir(DIR); rename($play, $play.".old"); open(NUPL, "> $play"); foreach $file (@files) { print NUPL "$file\n"; } close(NUPL); }'
      Any idea what that does? No? Well, it doesn't really matter, since no one will ever use this code ever again, but it did its job, and it did it well!* Now that I've seen the light, there are all sorts of little tasks that I find Perl ideally suited to.

      I no longer hate Perl.

      * This code went through all of my mp3 file hierarchy, reformatted the filenames to start with the track number, based on the order they appeared in the .m3u playlist, then generated a new playlist with the new filenames.

      --
      Steven N. Severinghaus
    12. Re:Why is Perl so hated? by e40 · · Score: 1

      Extreme conciseness has a dark side: it makes the code much more difficult to understand.

      Back to the original question: I hate Perl because: if I don't use it for a little while (couple of months), I can't program in it without cracking a book. I program in a LOT of other languages, ocassionally, and I don't have this problem with any of them.

    13. Re:Why is Perl so hated? by alan_dershowitz · · Score: 1
      You spent two paragraphs poorly trashing Java with completely unsubstantiated claims, compared it to a "car made out of legos" and stated it was designed to enable three-year-olds and grandmas to program. (What makes Perl a power tool in your mind? Ponderous syntax? I guess so, since it's the only thing you mentioned about Perl that Java doesn't have.) But then you say!

      You may use whatever language you like, but expect a well-deserved ass kicking if you get in our face and try to tell us you know better.

      So, when do you want to schedule your ass-kicking?

    14. Re:Why is Perl so hated? by Anonymous Coward · · Score: 0

      Slightly offtopic but you sure would sound less like an idiot if you wouldn't call yourself a "brilliant underground developer who produces amazing, high performance code". You just don't walk around talking like that about yourself.

    15. Re:Why is Perl so hated? by Lost+Found · · Score: 1

      I mention Java once in my post... do you have your reading glasses on?

      The reason I mention Java here is because it is the epitome of languages that are very specifically designed with the intent of forcing someone's idea of 'good design'. Well guess what... what's good design to you is shitty design to me.

      Of course, you could write bad Perl code... and so could I. But then again, with a language like Perl, we have the possibility to write any kind of code we want, because as Larry Wall so eloquently put it:

      "This is Perl, not fascism."

      What makes Perl a power tool in my mind? Did you even read my post? AUTOLOAD, for one. Or how about regular expressions?

      I'd be happy to list off some more:

      * Lack of strong typing
      * www.CPAN.org - nuff said
      * mod_perl and its near-infinite flexibility
      * Very flexible syntax
      * Dynamic on-the-fly runtime inheritence (and with a little help from AUTOLOAD, this can be Dynamic on-the-fly *per-instance* inheritence)
      * Lambda closures

      There's a reason they call Perl the swiss army chainsaw of UNIX programming.

    16. Re:Why is Perl so hated? by learn+fast · · Score: 1

      Common operations require a ton of syntax in Perl. It's just written in punctuation characters or implied by $_. This syntax requires fewer keystrokes at the cost of readability.

      Straw man arguments aside, count($arr) is better than $#arr because it's bleeding obvious what count($arr) does. And if you didn't know what $#arr does, there's no way to index that sort of thing in manual. Your only option is to get the book and 1) start at the beginning 2) read until the part where it explains that. The $_ variable is the same way. If you didn't already know how it worked, if it's not typed out there's no way to look it up. You have to read the book from the beginning until you happen to come across the place where it explains that.

      That is why people hate perl.

    17. Re:Why is Perl so hated? by chromatic · · Score: 2, Informative
      count($arr) is better than $#arr because it's bleeding obvious what count($arr) does.

      Not to me. count($arr) should always return 1, unless you meant count( @arr ) and want to break the consistency of list flattening everywhere else in the language. Of course, in Perl 6 you can say @arr.elements to get the number of elements in the array (though "elements" is a long method name, so there may be an alternate at some point if there's a good, clear, shorter synonym) or evaluate the array in numification context with +@arr.

      And if you didn't know what $#arr does, there's no way to index that sort of thing in manual.

      Sure it is! See perlvar, one of the oldest documentation pages. (If you never even knew of that page, it's well worth your time to browse the perltoc manpage.)

    18. Re:Why is Perl so hated? by Anonymous Coward · · Score: 0
    19. Re:Why is Perl so hated? by RAMMS+EIN · · Score: 1

      The problem I have with Perl is that it seems inconsistent. I make lists like (1, 2, 3), but if I want to pass a list as an argument to a function, that won't work. Instead I probably need to do something like enclosing it in angle brackets and doing some unwrapping in the function? Maybe I'm wrong, I never quite got the hang of this. Which just proves my point, I think (I get plenty of other languages just fine).

      Whatever I try to do in Perl, sooner or later I always run into something that doesn't work the way I expect it to. Obviously, that's because I don't "get it", but I think it's bad for a language to have many of those things that experienced programmers don't "get".

      --
      Please correct me if I got my facts wrong.
    20. Re:Why is Perl so hated? by Anonymous Coward · · Score: 0

      "Underground" my ass. Software industry got to a point where you're good, you don't need to be stuck in the basement.

      PERL hackers are the realm of the brilliant underground? For god's sake...

      Btw, why should't grandmas be writing software? Just like you think you should be able to cook up nasty PERL code, other should be able to rig up a car in lego if they want to. No one's forcing you to buy one.

    21. Re:Why is Perl so hated? by Lost+Found · · Score: 1

      That's really easy. You can make the list like [1,2,3] which returns a list reference, or you can take the list you already made, @list, and pass by reference: \@list. I don't see what's hard about that. The syntax is different than C, but then again, every language varies.

    22. Re:Why is Perl so hated? by RAMMS+EIN · · Score: 1

      Well, thanks for explaining. But don't you think it's inconsistent?

      If I want to have a string, I write "1 2 3 4". If I want to pass the string to a function, I say "1 2 3 4". If I want to put it in a variable, I call that variable $foo. I pass the variable to a function as $foo. In my function, I get the value by saying $_[0] (or $_[1], or whatever the position).

      If I want to have a list, I write (1 2 3 4). If I want to pass the string to a function, I say [one two three four]. If I want to put it in a variable, I call that variable @foo. I pass the variable to a function as \@foo. In my function, I get the value by saying \@{$_[0]} (or \@{$_[1]}, or whatever the position). Not _really_ sure about this last part, actually.

      Don't you think that's inconsistent?

      In Lisp, if I want a string, I say "1 2 3 4". If I want to pass the string to a function, I say "1 2 3 4". The variable I put it in is called foo. I pass it to a function as foo. In the function, I refer to it as whatever name I gave to that formal parameter.

      In Lisp, if I want a list, I say '(1 2 3 4). If I want to pass the string to a function, I say (1 2 3 4). The variable I put it in is called foo. I pass it to a function as foo. In the function, I refer to it as whatever name I gave to that formal parameter.

      Sounds more consistent to you?

      --
      Please correct me if I got my facts wrong.
    23. Re:Why is Perl so hated? by Anonymous Coward · · Score: 0

      Guess this is "nerd ass kicking"... (and lousy nerd at that) - I'm turning in my badge.

    24. Re:Why is Perl so hated? by Lost+Found · · Score: 1

      Actually, you'd dereference the array by saying @{$_[0]}, or you could do it like:

      my ($var1, $var2, $var3) = @_;

      or

      my $var1 = shift;
      my $var2 = shift;
      my $var3 = shift;

      then

      my @ar = @$var2;

      The semantics are pretty similar to C... by default, you pass by value (remember, a string in C like "foo" ends up providing you a pointer to a 4-byte null terminated foo in your data section).

      I see absolutely nothing that doesn't make sense / isn't consistent. By contrast, the semantics make it really easy to build big structures:

      $hashref->{key1}->{key1a}->{key1aa}->[0]

    25. Re:Why is Perl so hated? by nihilogos · · Score: 3, Insightful

      All this is dealt with in a consistent way, the section on references in "Programming Perl" took me a few reads but it eventually made sense.

      I like the part where Larry is describing the thing a reference refers to, which is termed a "thingy, in honour of the thingy that hangs down the back of your throat". Then there's a footnote that says "You could also call it a 'referent', if you prefer a joyless existence."

      Python zealots always strike me as the type of people who'd call it a 'referent'.

      --
      :wq
    26. Re:Why is Perl so hated? by Anonymous Coward · · Score: 0
      I never once said Perl was bad. I questioned your judgement in identifying so-called "power tools", because you can't tell the difference between your subjective PREFERENCES for what you want in a language and the objective VALUE of a language. You wanted to know why people attacked Perl, and assumed it was because you are so much better than everyone else and they're jealous. Then you turn around and attack Java. Wow.

      It's clear you don't even realize why I'm worked up over what you said. Well, to help you out, here's a little insight into the type of person who attacks Perl because they don't like the syntax: look in the mirror, because you're acting the exact same way.

      Claiming that Java is like a lego car is just obnoxious. Even if you don't like Java, you should have realized your statement was stupid and insupportable. Take a look at the J2EE specs and Jakarta Tapestry sometime. NOBODY is even CLOSE to what Java is doing in that arena.

    27. Re:Why is Perl so hated? by Orthoepy · · Score: 1

      Is Grandma writing software really a good thing? Is it such a bad thing, either? I'm not a programmer, but I write programs. Why? Because I need to do stuff that 1) I can write programs to make easier for me and that 2) nobody else seems to want to do so I can't find stuff already written for it. My stuff has a "user base" of at most, two. But Perl makes it easy to do what I need to do, regex stuff that would otherwise make my eyeballs fall out of my head. I taught myself from a couple of O'Reilly books, and if I can do it, anyone can. If Grandma wants to use Perl to organize her recipe files or knitting patterns or email from her grandkids, why not? Is she hurting anyone by doing so? What's the UNIX kernel got to do with it? Maybe you just feel a bit threatened that "ordinary people" are learning to write simple programs and you aren't the allknowing guru anymore?

    28. Re:Why is Perl so hated? by _Qiang_ · · Score: 0

      well said!

    29. Re:Why is Perl so hated? by Lost+Found · · Score: 1

      Not really. Basically, I have to expand on my point a bit to explain.

      I think that the reason Java has been so successful is what amounts to good marketing on Sun's part. They got the buzzword out, but more importantly, they handed it over to universities as a tool to teach students about programming.

      So rather than ending up with graduates that understand the operating system and programming, you end up with students that just understand programming, and Java programming at that. It's not a problem for them, because they'll probably find a nice job writing code somewhere.

      But the problem is they're poorly trained - they never got more than a passing glance at the container in which their programs run. They are either taught or leave school thinking that they shouldn't have to worry about what's outside their container.

      Hence, we have bad code. If Grandma wants to write herself some code to organize her recipes, fine. I just don't want Grandma to get hired to develop a large web portal, because despite whatever reality the hand-holder languages are trying to create, a web portal is a complicated thing. She'd then be trying to build a car out of legos, and all she understands is legos. Thankfully, there are still people building cars out of metal and lots of custom parts that know all about engines and performance and fuel efficiency and concrete.

    30. Re:Why is Perl so hated? by Anonymous Coward · · Score: 0

      Portal envy... Get your own freaking portal and refuse to hire grandmas.

      My guess: you're a frustrated sysadmin who wants to be a software engineer but no one wants you. :-)

    31. Re:Why is Perl so hated? by buttahead · · Score: 1

      use google: [control-l]. [tab]. $_ perl[enter]. click first site. /$_. == "

      The variable "$_" Perl presumes when needed variables are not specified. Thus: ...

              print; prints the curent value of $_"

    32. Re:Why is Perl so hated? by CoughDropAddict · · Score: 2, Insightful

      Why do I hate perl?

      Because when I said (1,2, (3, 4)) I really actually truly wanted a nested list, but Perl happily flattens it without warning. (Note: I know about references -- minefields suck even if you know where the mines are).

      Because I am tired of sloppy, legacy syntax like auto-quoting of barewords in some contexts, and the stupid hacks it takes to work around them (like prefacing constants with +).

      Because I want objects and inheritance, not blessed hash references and @ISA.

      Because I want to be able to index into strings with the [] operator, like pretty much every comparable language will let me do.

      Because the fact that ("" eq undef), ("Foo" == "Bar"), and (!"0") all evaluate to true makes me want to eat glass.

      Because evaluating an array in a scalar context is not an intuitive way to get its length. Nor is $#array.

      Because Python and Ruby are so vastly better, and yet Perl is what we're stuck with for the moment.

    33. Re:Why is Perl so hated? by CoughDropAddict · · Score: 1

      Actually, you'd dereference the array by saying @{$_[0]}

      Do you even notice what you just did? You wrote an expression consisting of 7 characters of punctuation and one numeral, just to refer to an argument passed to a function!

      Do you realize that in sane languages, you would just reference the *name* of the parameter, with no punctuation at all?

    34. Re:Why is Perl so hated? by Anonymous Coward · · Score: 0

      >> If you can't read someone else's code, there's only one reason -- you're not at the same level of ability as the coder.

      Oh! Fucking bullshit!

      Unreadable code is BAD code not LEET code!

      Get a fucking clue!

    35. Re:Why is Perl so hated? by Anonymous Coward · · Score: 0

      "This is Perl, not fascism."

      After reading some of the comments on this thread, I think it's a fine line.

      Powertools and 'ass kicking' indeed.

      Grow up for fucks sake!

    36. Re:Why is Perl so hated? by Anonymous Coward · · Score: 0

      Perl 6 addresses all of your complaints.

      For what its worth, I like the syntax, I like the fact that nested arrays are collapsed - its great for passing to functions a large number of arguments in a nice easy to read way. I also like the $#array syntax, its easy to read and does what it looks like it does.

      I do however agree with you on the ISA hack and blessed $self references - which is fixed in perl 6.

  59. Actually, I'd say that by Anonymous Coward · · Score: 4, Insightful

    never using a programming language again due to an argument you had on the internet identifies you as a particular kind of person.

    1. Re:Actually, I'd say that by Jack9 · · Score: 1

      The OP originally used Perl, perhaps that's the kind of person you're referring to?

      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    2. Re:Actually, I'd say that by cloudmaster · · Score: 1

      Note that OP didn't says that he'd written any other code since then, either. It was probably some guy on IRC arguing about wherther the animal on the cover of Learning Perl should be a llama or a single-humped camel. He sure wasn't someone who knew perl and had a use for it - 10 years ago the alternative was some combination of awk, sed, and a shell scripting language. He didn't switch to that, because he said he had no problems. :)

    3. Re:Actually, I'd say that by CDarklock · · Score: 1

      It's not the argument that bothered me, it's the threat. "You'd better agree with me in public, or I'll DESTROY you!"

      I don't think so. I'm going to go over here where you can't do squat, which takes away the tiny little insignificant amount of support I give *you*. It won't destroy you, but I don't really want to play that game anyway. One of these days, Tom may need *my* help with something, and do you know what I'm going to do? I'm going to help him. Because that's what this community is about, and a personal disagreement shouldn't affect that. The chance of Tom ever *specifically* needing my help is certainly slim to none, but it's the principle of the thing.

      In any case, I'm one of the very few people who wrote all their CGI scripts in C for several years, because that's what worked best for me. Eventually, PHP and ASP showed up. I remember being very excited at the release of PHP/FI 2.0, but when I look at the feature list today, I can't remember why.

      --
      Microsoft cheerleader, blue flag waving, you got a problem with that?
    4. Re:Actually, I'd say that by Anonymous Coward · · Score: 0

      I've seen some of your posts on Usenet over the last ten years, and I'm pretty sure that Tom Christiansen isn't ever going to need your assistance with anything.

  60. Do we need more programming languages? by master_p · · Score: 0

    To have options is a good thing, but not too many that are almost identical. In my opinion, there are too many programming languages going around, all being 95% similar to each other, but with that 5% of difference making interoperability very difficult, if not impossible.

  61. Apache and Rails by dozer · · Score: 1

    Rails users tend to use lighttpd instead of Apache and all its mod_ complexity. Rails scales pretty well. If you're running into speed problems it's likely because of Ruby's slow runtime and not mod_perl vs. mod_ruby.

    1. Re:Apache and Rails by VGPowerlord · · Score: 1
      Rails users tend to use lighttpd instead of Apache and all its mod_ complexity.

      You are aware that other languages also have FastCGI bindings, and thus will run under lighthttpd, right?

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  62. Obviously by fbartho · · Score: 1

    they were modded down of course... That's why you can't see them, you should browse at -1 to see those trolls. ;)

    --
    Gravity Sucks
  63. apache 1 by Anonymous Coward · · Score: 0

    How is the thread safe PHP library coming along? Still enjoying Apache 1 in PHP land?

  64. whitespace by mkcmkc · · Score: 1
    Significant whitespace is EVIL!!!!

    Actually, whitespace is significant in virtually all modern languages. It's just that this isn't enforced by most language specifications.

    (If you doubt this, try randomly reindenting a piece of code to observe how this destroys its readability.)

    Mike

    --
    "Not an actor, but he plays one on TV."
    1. Re:whitespace by maxwell+demon · · Score: 1
      The difference is that with non-compiler-interpreted indenting style you are actually more expressive, because you can express things the inventor of whichever indentation style did not think of.

      Look at the following C++ "n+1/2" loop (leading spaces changed to backquotes in order to prevent slashdot from messing with the indentation):
      while (true)
      {
      ``std::cout << "Enter filename: ";
      ``std::cin >> filename;
      ``file.open(filename.c_str());
      if (file) break;
      ``std::cout << "The file \"" << filename << "\" cannot be opened.\n";
      }
      Note that the special indentation tells you something about the statement in the middle: It's part of the loop control, despite being in the middle of the loop. This allows you to quickly scan all statements which are part of the loop control, even if they are in the middle of the code.

      Now, how would you do this with significant whitespace (assuming that the designer of the language didn't consider this indentation style)?

      Also, there's the obnoxious tab width problem. With non-significant whitespace it's just annoying. With significant whitespace, the correctness of your program may depend on what tab step the system uses! (Ok, probably every language with significant whitespace will define the exact interpretation of tab. Which means that on systems which don't agree with the language's interpretation, you cannot write code that's both correct and readable.)

      (Disclaimer: I don't know what Python does with tabs; maybe it just disallows them for indentation, which IMHO would be the only sane option.)
      --
      The Tao of math: The numbers you can count are not the real numbers.
  65. if you ever run a unix box you know why you need.. by sundru · · Score: 1

    PERL !! unbeliveable all this crib about perl, I work in a fortune 20 company and almost everything is done in perl - ETL, Data Mining, Log Processing , Solaris Sys administration, Account management .. Python/Ruby i yet have to hear it being used on a commercial project. Quite a bit of solaris administration is done thru perl I understand using php for web applications but thats about all i wld use it for now. Ever used DVD::Rip on linux it runs on perl/GTK there is a php/Gtk module but its nowhere as mature as perl

  66. Re:Perl 9 is already out... by wardk · · Score: 1

    you had a small typographical error, I have corrected it below.....


    There is no reason to get so defensive about these things with the exceptions of Windows vs Linux (Linux) and Emacs vs Vi (Vi).

  67. Re:I hate Perl. by 42forty-two42 · · Score: 1

    A whole lotta errors here. Try again, maybe with a pastebin instead? Assuming that slashcode broke it, and you're not just throwing together all of perlvar and hoping it works.

  68. Obligatory by value_added · · Score: 2, Funny

    I still find this funny.

    And still use Perl.

  69. Re:Perl 9 is already out... by hahafaha · · Score: 1

    If you want a flame war, email me at lgrinberg@gmail.com I have plenty of time on my hands...

  70. Flame On! by Qbertino · · Score: 2, Funny

    First of all some TLC for you Perl Fanboys (and girls) out there: Everybody loves Perl. Perl is cool, fast, delivers fast results in the area it rules and is the grand daddy of OSS languages. Nearly all books on Perl are fun to read and at least a great laugh.
    In fact it's quite amazing how long this quirky relic of ancient Unix paradigms managed to survive. It's 2005 and Perl _still_ is taken for granted as a PL. That's a terrific feat!
    The only PL in the same demografic group that is still in use is SQL. And everybody agrees that SQL is a pain in the ass and the people who invented it -if still alive - should be wrapped in brabed wire and shot into the sun. Larry Wall on the other hand still is a hero. Perl is fun. Sort of like riding granddads old bike that has no gearshifts and weighs a metric ton. If you tighten all the screws, fill up the tires and give the chain a good greasing you can feel the raw power.

    Yet I choose Python over Perl because of it's better OOP capabilities and the fact that it's code only gets unreadable if you use brute force in making it unreadable. Python enforces good coding habbits making it handy for group projects and n00bs, has a strong foothold in lots of areas where Perl lacks (Gaming, GUI, 3D, large Web frameworks, etc ...) and is the best candidate for a Perl successor. It only lacks Perls unmatched regex features. Entry the famous saying:

    Perl is executable line noise, Python is executable pseudocode.

    However, all academic discussion aside: If you think it's important to be a 'manly' programmer by preferring outdated development habbits over modern and, yes, easyer PLs, you're being silly. Perl being cool or not, there are situations were it is plain irresponsible to use it.

    --
    We suffer more in our imagination than in reality. - Seneca
    1. Re:Flame On! by Lost+Found · · Score: 1

      I still have yet to run into unreadable perl code that wasn't purpousely obfuscated. In the past, I did see a lot of code that didn't make sense, but that is because Perl broke the traditional rules and let you do whatever you want, and I wasn't as talented or experienced as the Perl developer whose code I was reading.

      Calling Perl an outdated development habit is one hundred percent your opinion, and has no basis in fact whatsoever. I still use Perl because it is still very modern. Between a very flexible syntax, tons of features (many of which were unique or close to being unique until your so-called 'modern' languages saw fit to borrow them from Perl), and CPAN, I have absolutely no reason to stop.

      I haven't used python much... but I will say that claiming "large Web frameworks" is something Perl lacks is total bullshit (look at Amazon.com, one of the most advanced shops out there... they run on HTML::Mason and mod_perl). Large web frameworks is actually one of the areas where Perl shines brightest, and as far as I'm convinced, no competing language can beat it in enough ways at once to even begin to take its title.

      If what you say about Python's syntax is true, then I'm sure that it's better for n00bs. But make no mistake - no syntax is powerful enough to stop n00bs from writing shitty code, and when your language is such that it is dominated with this class of programmer, you're going to end up with crap code, again and again and again and again and again.

      Moreover, there are some modern "technologies" like Java that I will never code in, because I demand flexibility and performance out of my apps. It's not at all about being manly -- it's about not writing shitty software.

      There are situations where it's irresponsible to use any language. Perhaps that's why we don't have a mod_x86asm? I certainly never claimed to be implementing kernels in Perl.

    2. Re:Flame On! by cgreuter · · Score: 1

      Perl is executable line noise, Python is executable pseudocode.

      It's this sort of jingoism that makes me hate using Python. The language itself is adequate (albeit with some flaws) but every time I consider using it, I can't help but think that I'm in some way aligning myself with people who say stuff like this so I use some other language instead.

      And their argument invariably boils down to one thing: Python uses less non-alphanumeric characters than Perl.

      woot.

      Could someone who isn't afraid of dollar signs perhaps chime in here with actual examples of how Python is better than Perl? Perhaps something having to do with the languages' semantics?

      I'd post my own personal beefs with Python here but I've done that once already so I'll just post the link .

      Personally, I think that Perl is a better language for programming in the large than Python.

    3. Re:Flame On! by photon317 · · Score: 1


      My singular reason for never using python unless I absolutely have to (which was only once - I needed to interface with a redhat up2date library written in python), is the whitespace thing.

      I would imagine if python were the same language it is today, but it ignored whitespace like all other sane languages and instead relied on pairs of paratheses/brackets/whatever and semicolons, I would probably like it. But the whitespace thing just kills me. It seems like such a horrible decision to me. Whitespace should never matter outside of quoted literal strings in source code.

      --
      11*43+456^2
    4. Re:Flame On! by lupin_sansei · · Score: 2, Insightful

      Well said. I for one am so sick of the "proof by repeated assertion" that python (and ruby) is more readable than perl. Yet nobody ever shows you 2 pieces of code, one in perl and one in python where it is clear that python is significantly more readable.

    5. Re:Flame On! by vandan · · Score: 1
      And everybody agrees that SQL is a pain in the ass and the people who invented it -if still alive - should be wrapped in brabed wire and shot into the sun.

      I don't agree with that. SQL is logical and entirely predictable. I occasionally hear people saying that SQL needs to be replaced by some XML-centric query language, but these are mostly Access newbies or FrontPage wizzes.
      Python enforces good coding habbits

      It depends what your idea of 'good' is. I don't like a language dictating when I use the spacebar or tab key. I like to lay things out the way I like it. I really can't bring myself to use Python until they drop this ridiculous, condescending attitude towards programmers: "Thou shalt indent thy code THUS!" . Bullshit. I'll indent my code how I feel. I indent and space my stuff more than most, and less than some. Nothing wrong with that.
      If you think it's important to be a 'manly' programmer by preferring outdated development habbits over modern and, yes, easyer PLs, you're being silly.

      Are you saying Perl has been outdated by Python? My God! I didn't even notice the whole Perl community up and migrate to Python, abandoning their old CPAN modules and recreating them in Python, thereby taking the Python programmer count from 3 to 3,000,000. Are you sure this has happened. Or do you wish Python was in the position Perl is in? A language isn't just what makes CS students have wet dreams by enforcing 'good programming habits'. A language is also the ecosystem of tools and community that grows around the language. Perl has an incredibly large and vibrant one. Python doesn't.
    6. Re:Flame On! by Chandon+Seldon · · Score: 3, Interesting

      I prefer programming in Perl to Python. This is primarily because Perl has better variable scoping, which combines nicely with "use strict" and "use warnings FATAL => 'all'".

      In Python, there are two scopes for variables: Global and Function. In perl, any { block } gets it's own scope for "my" variables. This means that temporary variables disappear when you're done with them rather than sticking around clogging up memory and name spaces. Because perl has variable declaration statements (my, our), it can check at compile time to make sure you have no typos in variable names. In python, any time you do an assignment you might be declaring a new variable - and you'll never know until you get incorrect output.

      Also, Python has no do...while(). This gives you the amazing choice of duplicating program logic (awesome when you change only one instance later) or putting in a "while 1:" - rather than knowing where the loop condition is, the maintnence programmer gets to randomly guess *and* this opens the way for "sometimes the loop never ends" bugs. Not good times.

      I'm looking forward to Perl 6 where it will be possible to have semi-static typing. That will mean even less code that compiles but doesn't work. I really wouldn't want to be using a language without similar features for any sort of non-trivial software project.

      --
      -- The act of censorship is always worse than whatever is being censored. Always.
    7. Re:Flame On! by Qbertino · · Score: 1

      Are you saying Perl has been outdated by Python?

      No.

      I didn't even notice the whole Perl community up and migrate to Python, abandoning their old CPAN modules and recreating them in Python, thereby taking the Python programmer count from 3 to 3,000,000. Are you sure this has happened. Or do you wish Python was in the position Perl is in?

      I mentioned that 'being silly' thing further up. What you're saying here mostly complies with that.

      First of all: Python isn't some exotic PL experiment with no one but a group of academics using it. Neither is Perl. Both are PLs that have a solid reputation. And for good reasons too.
      There are Python projects, components and extension out there that are the reference for everything else in the field they cover. Zope, PyGame, TAL, PythonCard, Soya, WXPython, Blender Realtime Engine .... all those are things are generally refered to as "how things should be done in this area". That's why Python is often refered to as a "Rapid Prototyping Enviroment", in case you've wondered. If you have some cool idea about a new Webapp Server like RoR (see recent /. hysteria), chances are something like that allready is in heavy use by the 'Python people' (Zope). 'Python people' ... now I'm sounding silly....
      Python, like many other PLs, borrows stuff from Perl - like the Regexes. The Perl community - not entirely made up of silly zealots - ripps of the one or other thing that Python has and is easyly implemented in Perl. PeTAL comes to my mind as example. That's how this great thing called 'open source' works.

      Second: What I wish for certainly has nothing to do with a uber-pointless debate over what 'positions' Python, Perl or other OSS PLs are in.
      But since we've come to 'Have a wish' time, I'll tell you what I wish for:
      I'd really wish for the total complete no-compromises Perl Regex engine to be a part of the main Python engine, better yet, the entire proposed Perl 6 Regex engine an integral part of Python (getting a hardon allready...) and a full, Python driven, true cross plattform (Linux, OS X/BSD, MickeySuck) OSS GUI kit with out-of-the-box web-remoting and all. Think a working pimped XUL-Runner without the XUL technology mess.
      That's what I wish for.

      --
      We suffer more in our imagination than in reality. - Seneca
    8. Re:Flame On! by vandan · · Score: 1

      I see. So we agree then. Just checking :)

  71. here you go by Anonymous Coward · · Score: 0

    Here's a snippet of real world code, extracted a piece of "production" software. (I can't include more, lest I divulge identifying information about the guilty.) I didn't degrade the formatting or naming--it came like that.

    I wouldn't mind Perl quite as much if I weren't called to maintain crap like this on a regular basis.

    sub somefunction {
            my(@A)=&handle_arguments(@_);my($num_opt)=${$A[7]} ;my($char_opt)=${$A[8]};
            my(@hash)=@{$A[0]};my(@file)=@{$A[4]};my(@dir)=@{$ A[3]};my(@array)=@{$A[1]};
            my(@string)=@{$A[2]};my(@num_opt)=@{$A[5]};my(@cha r_opt)=@{$A[6]};
            my(@raw_string)=@{$A[9]};my(%vars)=%{$A[10]};my(@r ange)=@{$A[11]};
            my($i,$j,$c,$d,$e,$f,$g,$h,$k,$l,$m,$n,$o,$p,$q,$r ,$s,$t,$u,$v,$w,$x,$y,$z);
            if($debug==1){print "\n\t\@hash=\"@hash\"
            \@raw_string=\"@raw_string\"\n\t\@array=\"@array\" \n\t\@num_opt=\"@num_opt\"
            \@char_opt=\"@char_opt\"\n\t\@file=\"@file\"\n\t\@ string=\"@string\"\n" }

    1. Re:here you go by hahafaha · · Score: 1

      The people who write this code obviously don't have an enter key or a space bar.

    2. Re:here you go by abulafia · · Score: 1
      my(@hash)=@{$A[0]};my(@file)=@{$A[4]};my(@dir)=@{$ A[3]};my(@array)=@{$A[1]};

      Friend, you don't have a perl problem. You have someone who needs to be removed from the project, or at the very least, whacked on the head with a data structures book every time they try a new interpolation trick out. And steal their perlmonks password and lock the account.

      --
      I forget what 8 was for.
  72. It's more than I can bear! by Dystopian+Rebel · · Score: 1

    I have just plucked out my eyes, you bastard!

    --
    Rich And Stupid is not so bad as Working For Rich And Stupid.
  73. Not from my point of view by metamatic · · Score: 1, Troll

    I gave up Perl this year. Now I write Ruby. Never been happier. Ruby is what Perl 6 ought to be.

    --
    GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    1. Re:Not from my point of view by Anonymous Coward · · Score: 0

      You may want to read up on Perl 6, as it has lots of Ruby inspiration inside. It looks very slick, so far.

  74. Depends by Tony · · Score: 2, Insightful

    Python is for weenies who want to be told how their source code should be laid out.

    Perl is for weenies who want to feel superior because their language can be write-only.

    I prefer Perl, myself. The few times I've used Python, I've hated the enforced layout. It seems like it wants to be a verbose LISP without all the parenthesis, but instead turned into a straightjacket.

    When I've used Perl, I've felt that I'm in a maze of twisting passages, each of them the same (or *mostly* the same). But it's a better feeling for me, having the Swiss Army knife with six screwdrivers, a garment steamer, compass, knife, knife sharpener, nuclear power cell, and fly swatter. Yeah, it's a mess, but it's a *beautiful* mess.

    But, like any cult, it depends on which one you want to join. Me, I joined the one that serves ice-cream on Fridays, because they allow dogs. The decision on which language to go with is almost as arbitrary, and certainly as absurd. Just pick one and code. Or pick both, and code.

    --
    Microsoft is to software what Budweiser is to beer.
    1. Re:Depends by Peaker · · Score: 1

      I really wonder how you lay out your Perl code, or any other language for that matter...

      You don't indent it?!

  75. Re:Perl 9 is already out... by Anonymous Coward · · Score: 0

    s/(nec)c(e)c(ary)/$1$2ss$3/g;

  76. Ruby is Perl6 Now! by Colonel+Panic · · Score: 1

    Stop waiting around for Perl6 and start using Ruby.

    1. Re:Ruby is Perl6 Now! by Anonymous Coward · · Score: 0

      Ruby is not Perl6. Parts of Ruby have been borrowed, to be sure, but it's not Ruby.

    2. Re:Ruby is Perl6 Now! by kahei · · Score: 1


      Oh, yay, Perl6 without Unicode, threads, up-to-date documentation, or an intelligible release schedule.

      Compared to which, the lack of CPAN etc is trivial.

      I love ruby but I don't think it's going to be a perl replacement until the project is scoped and run less like a hobby.

      --
      Whence? Hence. Whither? Thither.
    3. Re:Ruby is Perl6 Now! by Colonel+Panic · · Score: 1

      I love ruby but I don't think it's going to be a perl replacement until the project is scoped and run less like a hobby.

      Talk about the pot and the kettle and name calling...

      Perl6 was announced when? about five years ago as I recall. And it's still in the vapor phase. Perl6 is always about 2 years from being a reality, but I suppose that IS an intelligible release schedule... for a platonic ideal.

  77. Port the up and coming language to parrot by Crag · · Score: 1

    Perl6 and Parrot will stabilize in a few years (5?), and it's very likely that the bulk of CPAN will be ported to Perl6 in a way which is compatible with Parrot-hosted languages which behave themselves.

    Suddenly (not) the perl syntax will be on even footing with any other language implemented over Parrot. "The right tool for the job" will take on a whole new meaning.

  78. Perl's too slow. by Anonymous Coward · · Score: 0

    Sorry. It's just too slow. I have other things to do. For serious work, I use serious tools, like gcc.

    Maybe for a one-off or something where using "associative arrays" can help help you solve a simple problem then perl is okay.

  79. Who cares about programming languages? by lmb · · Score: 2, Insightful

    People who still care about programming languages are wasting their breath.

    Look at the difference between a bad, a good programmer and an excellent programmer. We're talking 1 to 2 to 10 factors in productivity and quality here, easily.

    Programming languages? Unless it's a language (or programming paradigm) the programmer doesn't know (in which case it doesn't matter much whether it is Java, C, C++, Perl, Python or ruby) at all, the difference for the same programmer from one to another may exist (depending on how fluent they are), but likely more on the order of 10-20%.

    This is much the same like arguing about indentation and whitespace style. None of the common ones is _significantly_ better than the other, and the time spent arguing about them sure ate up any gains they might have ever offered. Pick one and stick to it, amen.

    So, the choice of language is almost irrelevant compared to the person (or team) you get to do the job.

    For quite some applications, it doesn't even matter whether the interpreter or the compiler is exceptionally fast or produces such code, as long as it gets the job done. (I've seen people tune code for hours, to get it to run 5s faster at a total runtime of 1 minute once per month. While artistically pleasing, it's a waste of time.)

    Sure, there's exceptions to this rule. If you want to write a Linux Kernel module, you're essentially forced to write C. Some languages have either special features in the syntax or many libraries available to solve problems in a specific problem field. (Perl really beats C for writing string matching, for example.)

    But overall, these don't matter as much as you think they do.

    Now, with that said, one exception I'd like to dip into, and why I'm glad that python exists. (Take note I'm a Perl head myself!) Perl allows not one, not two, but several hundreds of ways of doing the same thing. Picking one of the "best" choices to do something is a matter of style, taste and experience. Understanding it is too. So, I'd argue that -good- Perl is slightly beyond the average programmers, because if you had the skills, you'd be at least a good programmer already.

    Python/Java, on the other hand, is stricter. (It starts with enforced code formatting and goes from there.) This, to a free-thinker like myself, often feels like an artifical constraint. _I_ want to decide how to do this, damn it! But, if you want to enable average programmers to just get their small hack in quickly and almost cleanly, Python might not be the worst choice, while Perl might rate pretty low.

    I still love Perl. And Perl 6 looks like a real improvement, surprisingly both in features as well as in style - that is quite a feat.

    End of rant ;-)

    1. Re:Who cares about programming languages? by samulik · · Score: 1
      Programming languages? Unless it's a language (or programming paradigm) the programmer doesn't know (in which case it doesn't matter much whether it is Java, C, C++, Perl, Python or ruby) at all, the difference for the same programmer from one to another may exist (depending on how fluent they are), but likely more on the order of 10-20%.

      When measuring such things as code quality, productivity and the number of bugs in programming projects, one of the few things that people agree on is that the number of bugs per line of code is fairly constant across languages. Because a program that accomplishes the same task is far shorter in a high level language like perl or python than in C or C++, the perl or python version also likely has far fewer bugs in it. So at least that way higher level languages have a large advantage over lower level ones.

  80. Who cares!! by Anonymous Coward · · Score: 0

    Is anyone still using Perl for anything of value?? I didn't think so...so just move on, nothing to see here...

  81. Perl is not obfuscated... by hummassa · · Score: 1

    It's Huffman-coded: things you use a lot are shortened.

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  82. I tried python by hummassa · · Score: 1

    perl : python :: C : COBOL

    I found it clear but verbose; things that are golf-able in perl take 10 lines to write in python. Perl, in general, makes things more clear to me because I can see the "big picture".

    --
    It's better to be the foot on the boot than the face on the pavement. ~~ tkx Kadin2048
  83. To Paraphrase the NRA by truckaxle · · Score: 1

    Perl doesn't write bad code, people write bad code.

  84. Python... by fyngyrz · · Score: 1
    ...much, much better than perl 6 now, plus missing the awful syntax, bracing, and built-in obscurity. Until you import the re module, that is.

    Try it, you might like it. :-)

    --
    I've fallen off your lawn, and I can't get up.
  85. Re:Clarity by Anonymous Coward · · Score: 0

    I think it's the opposite. The language is like a natural language to the programmer due to its expressiveness, part of its TMTOWTDI. I consider that one of its drawbacks. The modem, to use your example, doesn't care how clever or terse or verbose or tricky the code is. I recall a CS professor (teaching assembly) dismissing Perl as a "bag of tricks." But Perl programmers seem to enjoy this freedom to reach into the bag and choose from a multitude of ways to code something.

    I for one don't think programming languages need to be like a natural language. There are reasons we like languages that give the speaker/writer the ability to paint images with words and not always say the same things the same ways. But for programming, the computer doesn't care how "evocative" your code is.

  86. Re:Perl: Lead Painted Asbestos Toys for Tots by stuntpope · · Score: 1

    I'd hardly point to this site as a poster child for Perl. Can we some day get meaningful page batching (so that when I click '2', I don't then have to read an almost-full screen of what was on page1 before getting to the next posts)? Not that it's Perl's fault.

  87. Always use root? by Anonymous Coward · · Score: 0

    Answer this question: Why shouldn't you always log into your computer as root?

    One answer: So you don't accidentally delete or change something that breaks your system.

    That's why there are languages that "hold your hand really really tight".

    I spend almost my whole day programming in C and I love the power it gives me. However, I can see advantages to languages that prevent me from creating a wild pointer, again, as I do on occasion despite decades of experience.

    I prefer warnings from my compiler or lint tools as opposed to hand holding. Some just aren't smart enough to know when you can ignore the warnings.

  88. WOW ANY FONT by Anonymous Coward · · Score: 0

    you should go work for nasa or ibm or sumthin cause you can print in ANY FONT.

  89. legacy "unreadable" Perl code by fprog · · Score: 2, Insightful

    The problem with any programming language and it's once legacy source code writing style kicks in, this is true for any language, include C, C++ or Perl.

    The older the language is, the more chance that you find some unmaintainable legacy source code.

    The thing with newer language with Python, Ruby,
    PHP, Java and some C++ is that these are "recent" language, therefore, the odds of finding a very old legacy system is smaller.

    In 10-15 years from now, you will say that Python, Ruby, PHP or Java is so "unreadable",
    because they are no more the "flavor du jour"
    and new constructs exists instead. Like most people says about cobol, pascal, scheme, lisp source code.

    There is a difference between "unreadable" and "encrypted".
    The former was not "expecting" to be unreadable, it is just badly written by mistake or use older construct that nowadays are no more used.
    The later was made on purpose, which is the difference.

    If you want "unreadable" C source code, take a look at Graphviz Dot, no it's not part of IOCCC and was not make to be part of it, but if you ever try to understand this legacy code, good luck!!!

    Disclaimer, Graphviz dot is a nice piece of software, but it cries out loud to be heavily refactored.

    In fact, the first two layers were refactored, but the core engine is dated back to the 80's with K&R style and variable/function/struct name being less than 5 characters!

    http://www.graphviz.org/pub/graphviz/ARCHIVE/graph viz-2.4.tar.gz

    If you want "unreadable" Perl source code,
    take a look at any source code, which have:

    no "use strict;"
    no "use vars qw{};"
    use heavily "local"
    use heavily "map"
    no "return" statement --> $r; == return $r;
    use heavily complex non-trivial regexp without documenting them.
    no documentation or POD.
    use some old perl construct.

    Take a look at this one,

    clc (gzip'ed tarfile)
    Counts total lines, noncomment lines, and statements in C/C++ source.
    Written by Brad Appleton in 1995. Implemented in perl.

    http://www.chris-lott.org/resources/cmetrics/clc.t ar.gz

  90. Perl6 lovers should line up by Anonymous Coward · · Score: 1, Insightful

    and kiss Autrijus' ass for saving their language. The project was completely stagnant before he single-handedly wrote an actual Perl6 (pugs) interpreter. Thankfully Autrijus leads by example and inspires people. What a marked change from the drudgery and stupidity of a certain VM project that was on the fast-track to nowhere.

  91. How is Parent a Troll? by Anonymous Coward · · Score: 0

    Really? How?

  92. Re:Perl 9 is already out... by perlchimp · · Score: 1

    Before being a pedantic asshole, make sure what you are saying is correct. Greedy is only needed if the entire regex chunk may match more than once. /pedantic asshole

  93. Re:the thingy by neonsignal · · Score: 1

    And I thought it was the 'uvula'... (yes, I know, I need to get a life)

  94. On "Perl is executable line noise, Python is ... by Qbertino · · Score: 1

    ... executable Pseudocode."

    I really don't understand the reason people (mostly Perl people to my impression) get all worked up about this sentence. Some Perl People tend to think it's an insult to Perl, Which it absolutely isn't. It doesn't even put one PL in a better light than the other. It just adequately describes the character of both compared in a humorous way.
    I use both (Python more than Perl, but that's only because for the Projects I do Python is suited best) and don't feel the least bit put of from Perl by this true and witty one-liner.
    Bottom line:
    Chill out, people. It's just a saying with some truth behind. And I'd even guess it was made by a Perl programmer.

    --
    We suffer more in our imagination than in reality. - Seneca
  95. Perl 5 is worth learning. by altp · · Score: 1

    Perl 5 is still a very viable language. I have and continue to use it for large programming projects. Its string manipulation support is still among the best out there. CPAN provides a very large archive of 3rd party modules so that you don't have to reinvent the wheel. perlmonks.com provides a wealth of tips/tricks and knowledge that no other language has.

    With that said, I don't disagree that Perl has many short comings. Python is ellegant and easy to read. I've done quite a bit of programming in python over the past couple of years, but I really don't like languages that rely on whitespace.

    PHP. Mixing logic and content is a mistake which is how it is mostly used these days.

    Ruby is a neat fad. Actually, i hope it catches on even more. I recently started learning ruby and enjoy it s far ... though, i'm not sure how much I would actually consider using it at this point (in a production sense). Good documentation is still hard to come by, and if you google for something it brings up mirrors of the same document.

    C#/Mono/.net ... C# looks like a great language, I spent several months playing with it and considered using mono for some production programs. But using it scares me ... C# is an established standard, but .NET is not and can change at the whim of Microsoft ...

    C/C++ ... old tried and true languages. I would encourage any NEW programmer to start with ANSI C. Its great to learn on; memory management, pointers, etc ... all valuable thigns to know how to work with. My only real problem with C and C++ is that working with strings is a nightmare.

    I could go on and on, but ultimately I always find myself falling back to Perl ... Its proven to be stable, has a large community behind, is well documented. Perl 6 does worry me a little though, and there will be a lot of time spent testing before it hits any of my production servers.

  96. kiss by namekuseijin · · Score: 1

    except Perl is all but KISS. TIMTOWTDI is its approach to problem solving. and its big, mixed barroque syntax, although can lead to very compact code, is all but KISS as well.

    Good Perl programs can be considered KISS, as long as who are reading them are aware of common Perl idioms and its large non-KISS syntax.

    --
    I don't feel like it...
  97. Re:It's a php/perl post! by Anonymous Coward · · Score: 0

    I thought Amazon.com was written in C as a single big-fat binary called "obidos".

    I didn't know there was Perl code in Amazon.

    *shrug*

  98. libraries by namekuseijin · · Score: 1

    Generalizing: it doesn't matter how bad a language is, as long as it has a robust, large and varied user library covering everything you can imagine under the sun. This is because people either don't have the time, desire or technical knowledge to implement such functionality by themselves. They are just client programmers.

    look at C ( almost every native libs written in it ). look at Java ( enourmous user library ). look at Perl ( CPAN ). look at VB, damnit ( simple access to almost all Windows services )!

    I'm not saying Perl is as bad as those other examples, but its true shining aspect, aside its many convenient syntatic sugars, is CPAN, indeed.

    --
    I don't feel like it...
  99. Why ask why...Give Perl a try! by Mr.+Scripto · · Score: 1

    First, I think we're all off topic here and should be discussing Scott's book...sorry Scott, haven't read it yet. I find it incredibly amusing that everyone always asks..."Why should you use Perl any more?". I think the real question should be, "Why SHOULDN'T you use Perl?". Just because a language is older doesn't mean that it's still very well suited to solve the majority of your programming needs. Perhaps Perl isn't well suited for certain niche applications or (Perl mongers forgive me) super easy web design like PHP; BUT, that doesn't mean it's worthless and should be abandoned. It will forever have a place in the corporate scripting world. That's probably why (contrary to other "I ditched Perl for Python" posters) I know 10 Perl coders for every one that professes an affinity or even working knowledge of Python. And yes, hate mail to the white space fanatic that spawned that little "requirement". Because Perl is no longer the new flavor of the month shouldn't equate to everyone questioning it's value or worth. It should be given fair consideration along with any other language when reviewing a project need balanced with the costs of having your programmers learn a new language. If Perl can efficiently solve 90% of your needs, why not chose to use it 90% of the time. Of course, it really comes down to what you're comfortable with, cause if everyone did a fair review, I'm guessing that many of the newer scripting languages would have been determined as mainly unnecessary and would have never gotten off the ground, or could it be that Kerrnigan & Ritchy would have had the last laugh and none of these languages would exist (particularly the MS ones).

  100. disagree by mkcmkc · · Score: 1
    Note that the special indentation tells you something about the statement in the middle

    I'd argue that it doesn't, and the fact that people think that it might is actually a disadvantage of Perl (wrt Python).

    The indentation only gives this information for lines for which the author, or anyone else who's handled the code in the interim, didn't somehow screw up. The only way to really know is to run it through a reindenting tool that knows about your convention. (You did write one and include it with the code, along with a spec for your indentation style, didn't you?)

    In my experience, hints like this that are wrong 1% of the time are worse than no hints at all--it takes quite a while to realize that you can't trust them.

    You may think this radical, but I've had to try to interpret way too much bogusly indented Perl in my career.

    Unfortunately python does allow both tabs and spaces, and I agree that this is a problem, albeit a very minor one. I'll leave you to track down the various reasons why this doesn't seem to cause trouble in practice, and just mention that in my 5+ years of Python programming, I've never seen a single bug due to this.

    Mike

    --
    "Not an actor, but he plays one on TV."
  101. Re:the thingy by Anonymous Coward · · Score: 0

    Oh, come now. Every proper nerd of our generation knows that it's called a uvula. How else do you manage to get Rosella out of the whale's belly in King's Quest IV? "tickle thingy with feather"? I don't think so.

    That's like saying you have no life because you know what a Wumpus is... wait a minute.