As a better awk/sed/bash, I think I've never seen a tool as good as Perl4. But then Larry decided it had to one-up C++ in some sort of "what's the worst possible way to glom on some confusing fake-OO-wrapper around a language that's main strenght was being not-OO" contest.

Slashdot reminds me of the townspeople in "The Simpsons" the way the majority opinion changes.

It wasn't that long ago that Perl was a darling, loved by all, with indecipherable code flowing freely in sigs and comments. Many even seemed to take pride in creating and sharing the most obtuse code imaginable.

Now it's, apparently, the worst thing ever that no one in their right mind would use for even the most trivial task.

There has been at least 2 huge shifts in culture in/. since I've been around and I think I was part of the 2nd wave that replaced the original/. crowd. I suspect a lot of the guys with sigs 200k and below were enthusiasts about Perl. In 2000 I would have called Perl my favorite language. By 2005 when Pugs came out I was a Haskell fan so the idea of a dynamic language with the fluidity of Perl having many of the powerful idioms of Haskell (what Perl 6 sort of has) was tremendous. A computer project tha

I don't think we're ever going to get as clear of an example of the second system effect [wikipedia.org] as Perl 6. If you asked me back in 2005 if I thought it was going to take more than a decade for the next Perl version bump, I would have said no way. Now I'm wondering if Larry and company shouldn't just ditch Perl 6 and come out with Perl 7, that is basically just Perl 5 with some tweaks to make complex data structures less of a nightmare and better integrate the object model, plus some tweaks around the edges like the implicit/x switch on regular expressions.

Unfortunately, those that ultimately ended up with the Duke Nukem rights didn't know that Duke Nukem Forever was never supposed to be released, and the point of calling it "Duke Nukem Forever" was itself the joke... Lacking this sense of humor they decided to develop and release something anyway.

I don't think there's a second-system effect going on with Perl 6. Every two or three years some new team has come along and tried to implement it, only to totally fail and produce nothing usable. These people didn't implement Perl 5, so I don't think we can say that Perl 6 is a second attempt for them.

These Perl 6ers have just continually done stupid shit with half-assed virtual machines and intermediate languages, rather than getting real work done.

You're implying that C-based interpreters are quicker and easier to develop, but that's patently not the case. Just look at the recent huge surge of LLVM-based JIT languages that have been developed extremely rapidly and in high-level languages. C is probably a poor choice now that good alternatives really exist.

Maybe the problem isn't the choice of language. Maybe the problem is that the designers were incompetent.

Writing a virtual machine in C is dead-simple. It's just a loop over a table of opcodes. You can even get fancy and thread your dispatcher (that is, replace your loop conditionals with direct jumps to the next instruction handler), making it nearly as fast as JIT'd code because the CPU can pipeline all your virtual instructions.

In fact, writing a virtual machine is arguably easier than writing an AST (abstract syntax tree) interpreter (which is what Perl5 is), because it's an elegant abstraction that cleanly separates areas of concern.

If you can't write a VM in C than you're definitely not an experienced programmer. And if you think using LLVM to write an interpreter is easier, than you're just... I don't even know what... totally out of touch and have no clue how this stuff works.

The VM isn't the problem. It's all the bells and whistles. The typing and object system. The FFI system. Garbage collection. Perl6 is a complex language, and they tried to bury too much of that complexity at the virtual machine layer. Or at least, they got tangled up in it.

They couldn't use existing interpreters because at a minimum they wanted sane string prototype with a proper understanding of Unicode, something Java, C# and other systems lack. Perl 6's NFG (normalization form G) is a thing of beauty, but to make it fast you have to put it at a low-level. As for why they got hung up on all the other stuff, I don't know.

To see what a fast, practical, feature-rich, and state-of-the-art (non-experimental) virtual machine looks like, I would recommend Lua's VM. It's about as simple as you can get and yet remain widely useful. It's completely written in portable, ANSI C (1989), it's several times faster than Perl, Python, Ruby and most other non-JITd interpreters, and the bytecode dispatcher is basically a giant switch statement inside a loop--very easy to read and work backwards through how the typing system works. (It could be made even faster by threading the dispatcher, but to remain concise and performant--without a mess of function pointers-- would require using a non-portable construct like computed gotos. Although the only C compiler I know of which doesn't actually support computed gotos is Visual Studio.)

So a few years ago, a bunch of people decided that there was no point in waiting for Perl6, and started back porting the features they liked into Perl5.

And to deal with the whole issue of the Perl6 syntax not being compatible w/ Perl5, they've added 'use feature' where you can tell it which features to enable. (or specify a version number to turn on a whole bunch of things)

So, you want postfix dereferencing [perltricks.com]? Then use perl 5.20, and enable the feature. (although, I believe it's currently enabled via 'expe [metacpan.org]

Oh my God! Is PERL really competing for worst language with Brainf*ck? After reading the article on the operator mentioned, I can only assume so. I can't believe with all of the syntax backward-compatibility crap they've bolted on they couldn't just have cleaned up the syntax. Thus, my assumption is the only reasonable explanation. Or maybe brain damage... I hear you get that from PERL.

Oh my God! Is PERL really competing for worst language with Brainf*ck? After reading the article on the operator mentioned, I can only assume so. I can't believe with all of the syntax backward-compatibility crap they've bolted on they couldn't just have cleaned up the syntax. Thus, my assumption is the only reasonable explanation. Or maybe brain damage... I hear you get that from PERL.

No, it's actually more of a vicious cycle. Bad coders write bad Perl, which leads to brain damage, which results in worse

Maybe Perl isn't completely "dead", but it sure as fuck isn't as vibrant of a scene as it once was.

In the 1990s, Perl was THE BIG THING. It was cool. It was trend-setting. It was what let average programmers and sys admins become superheroes, and it let good and great programmers and sysadmins become ABSOLUTE GODS.

Knowing Perl was what got you jobs. Knowing Perl was what let you get the hard work done fast. Knowing Perl was essential. If you didn't know Perl, you were SHIT IN A URINAL.

Perl's got some fierce competitors now. Python can do everything Perl can do, but with a way cleaner syntax. Ruby isn't as capable as Perl or Python, but it has a religious aspect to it that makes some hipsters go absolutely batshit crazy for it. Perl just can't compete against them.

Yeah, Perl isn't dead, and there are a lot of people who still use it today. But let's not kid ourselves, it's not the 1990s. It's not the GLORY DAYS OF PERL, when it ruled the roost.

I've never had issues with emailing python code between people within my research group and those outside of it from time to time. Maybe that is because we standardize on using spaces instead of tabs and the email programs don't strip that when sending just text emails. If you are sending something more complex then a dozen lines you could/should just send it as an attachment anyway. Or if you don't keep sensible line lengths, as I've had some email programs of yore insert linebreaks in a bunch of places

If only I could turn off indentation==scope. I would pay $20 for this ability (to work in every interpreter, not some special one off interpreter just for me).

Even *with* that limitation (and yes, I know a million people will respond saying it's oh so great and I just don't get it), I still think Python is pretty decent.. Though it seems to have (seemingly) superfluous colons in a few places, which reminds me of Pascal or BASIC.

My senior colleague also does not get it. The thing is, with C-syntax you need braces + indentation. So python halves your work out of the box. In C when indentation and braces are mismatched you read the code one way, but the computer interprets it differently. In Python: fixed.

pass is the equivalent of a nop, it has nothing to do with scoping. Have you ever read or written any python?

According to every single example given on the python documentation page, pass is used to end a block. It get's even more hilarious when you try embedding python into (for example) html pages like web2py does (I've been using web2py hence my discovery that python actually has to have an end brace of sorts).

'Pass' is not a 'noop', according to the documentation; it's simply an empty statement serving only a syntactical function. In other words, had python had an end-brace the way it has a start-brace, 'pass'

just last week had to install some nagios nrpe package that had some Perl library requirements, and it was hell first trying the one from repository, then a couple alternative CPAN ones, and finally finding the actual POS that would work.

Same here. The great thing about Perl is not all the things you can do with it, but all the things you don't have to do because there is CPAN module that already does what you want. IMHO, the most important characteristic of a language is its' usefulness and Perl is very useful indeed.

Same here. I am a freelance Perl programmer and for the past 12+ months have been very busy with coding in... Perl. More so than when Perl was considered the "glue that holds the web together". And no, it isn't maintenance of old code.

A number of people who left Perl and declared it dead are the ones that couldn't program in Perl to begin with (never learnt the language, thought it could be learned by trial and error), and most likely still can't in whatever they consider fashionable right now.

Perl 5.20 was just released [perlnews.org] and "represents approximately 12 months of development since Perl 5.18.0 and contains approximately 470,000 lines of changes across 2,900 files from 124 authors."

That doesn't seem to bad to me, but I'm not sure how that number of core release authors compares to other languages like Python or Ruby.

More telling is how utterly fast Perl is compared to the other languages. I've run most of the sample files from this language shootout [raid6.com.au] and had remarkably similar results to what they list there.

The Perl version performed on par with the C and C versions, and it's growth/memory usage stayed pretty consistent throughout. The other languages were horrid. They took much longer, and their memory usage grew significantly during the run.

I use Perl still when doing scripting tasks. I love Perl, always have. I don't, however, necessarily think it's the right choice for building a medium to large web-based application any more. Sure the performance is there, and there are some great frameworks like Catalyst and Dancer, but to me, they still feel a bit antiquated to some of the other technologies I've used. Plus installing tons of CPAN modules can get a little trying at times.

String manipulation is the core functionality for all languages so this allows to compare languages fairly.

If that doesn't clue you in on how utterly full of shit he is, I'm not sure what will. I mean, Java Strings are immutable. This test is just about adding strings together. That's pretty much the worst possible case for trying to benchmark Java. So if you're coding Java and adding a bunch of strings together, you use a StringBuilder and not a String. Only you can go look at the source code, and whoever wrote it didn't. Not only that, but how much memory Java would use during th

Really? what's replacing it? (genuine question... I haven't seen anything that really fills that niche as effectively nor as completely)

Perl 5 is still charging full steam ahead in every sysadmin group I've been around. I know there are python advocates out there, but I have only encountered ONE major IT shop that is completely (or nearly so) python driven (and it happens to be Guido's employer -- hardly a good example). Other than that, the most I've seen is _some_ python but _mostly_ perl in any IT shop.

Sure, language-geeks have been talking about what other language has done a better job of being "a language" for at least 10 years... but really, anything you can say negatively about perl can be said about bourne shell programming. And, yet, not only did bourne shell dominate *nix sysadmin and package install programming for 25+ years, but it is _still_ being done out there, by some backward luddite sysadmins. Perl has only been dominant in the sysadmin space for less than 15 years... I wouldn't be surprised if it lasts at least another 10 more. And, really, since it lacks many of bourne shell programming's problems, it'd be reasonable to expect it to keep going for a lot longer than that. Especially as perl 5's evolution continues to slow down and become more stagnant (creating a consistent and stable programming layer... which has not been true through the entirety of perl 5's lifespan -- there were a few major hiccups there as various sub-systems were refined or changed).

(to be clear, perl 5 has _existed_ for more than 15 years, but it didn't become really dominant as a sysadmin language of choice, finally eclipsing bourne shell, until the very late 1990's or early 2000's... probably about the time that y2k issues wiped out anything too old to have/support perl, and the last of many *nix vendors and most linux distro's being sure they included perl in their boilerplate installation, pretty much removing bourne shell's one major claim to fame (ubiquity).)

Like I said, I haven't seen python take over anywhere other than Google. That's a big claim to fame, surely. But, it's not as wide spread as it could or should be, at this point in python's life, IMO. It just doesn't have the momentum nor clear advantage (to non-language-geeks) over perl to push it forward fast enough to overtake perl.

I do like python, mind you. I just think it's stuck in the betamax / BSD niche (academically superior to its cousins, but stuck in second place for reasons that have nothi

I moderated in this article, but this is something that I'd like to talk about for a bit, even if only anecdotal...

Perl 5 is still charging full steam ahead in every sysadmin group I've been around. I know there are python advocates out there, but I have only encountered ONE major IT shop that is completely (or nearly so) python driven (and it happens to be Guido's employer -- hardly a good example)

Over the past 8 years my own usage of Perl in writing code has declined to zero. There has been a mentality change over the years in the shop I work in, and where we used to grab for Perl by default as a quick'n'dirty duct-tape & MacGuyver language, we now exclusively rely on Python. I think there are several reasons for this shift.

The most prominent one to me personally is that other languages have adopted CPAN-like repositories. I don't know about the statistics of numbers of modules, active development, number of commits, etc etc, and put bluntly I really don't care. Although these statistics are interesting into disseminating how active a language is to its developers, to me as a user of the language it only matters if a module is maintained and does what its supposed to do. The thing is, for most of the things I used to use Perl modules for, I now use Python modules, and can say "Well, it's good enough".

Our development teams composition has also changed. A lot of our older generation of programmers/admins have retired or switched jobs, and a lot of younger people were hired to replace them. The younger generation is definitely more familiar with Python, Ruby and other scripting languages than it is with Perl. The incentive for learning Perl has become a lot smaller. Perl was the de facto language for many when writing a CGI script, but then RoR and AJAX happened. While over time Perl adapted (think Catalyst and Dancer) other languages have adapted as well. Look at all the wsgi applications and frameworks in Python.

Our investment in Perl itself was more of the kind where we used a set of scripts to change data from format A to B at which point our Java and/or C++ code takes over, or some tools to deal with our logs, etc. The switch to Python for these tools was gradual (but quick) process, and we found ourselves not looking back. I can't really say that we were/are heavily invested in Perl or Python, but for day to day usage Python has completely taken over. Who knows where we end up in another 8 years from now?

Lastly, if you were to go around our shop, asking people what's new about Python 3 you'll get pretty much right answers. If you go around our shop asking people what's happening with Perl 6, you will get a blank stare. I remember clearly how Perl 6 was going to become the best thing since butter on toast,... There was general excitement about it all, and then there was a whole load of... well... nothing. We're 11-12 years further and there's still no sign of Perl 6. What the hell happened there?

Perl has only been dominant in the sysadmin space for less than 15 years... I wouldn't be surprised if it lasts at least another 10 more.

I don't doubt that Perl will be around for a whole lot longer. It has assembled a group of dedicated die-hard users and developers over the years, and in general it has a great community. There are older, more horrible languages that are still alive today, so I doubt Perl will be gone anytime soon.

However, while my entire post is anecdotal, I do think the Perl community is deluding itself a bit. The talk in the video (I actually listened to it in the background while working on something) mentions a lot of statistics that are interesting to the Perl developers and maintainers, but are hardly and indicator of usage or adoption. The more interesting part of the statistical talk was about the general decline of jobs available for scripting languages in favor of newer technologies, but even those statistics in general don't speak much about usage and adoption.

FWIW, may Perl be around a long long time. Having more tools at your disposal is never a bad thing.

I remember clearly how Perl 6 was going to become the best thing since butter on toast,... There was general excitement about it all, and then there was a whole load of... well... nothing. We're 11-12 years further and there's still no sign of Perl 6. What the hell happened there?

Don't get me wrong about this particular thing... all of my commentary is about Perl 5. I think Perl 6 is dead on the vine. I think Perl 5 will probably be the final definition of the language. It will get refined, and bug fixed, but I don't think it will get the type of complete change that Perl 6 implies (not the current concept of perl 6, nor any concept of similar scope that might replace the current perl 6 concept). Nor do I think that that's a bad thing (for Perl 5 to be final definition of the l

There are developers who ride the wave of new languages (who appear to be surfing towards Go and Rust now that JavaScript has crested). In that respect, Perl has long since settled down, and Ruby is on the wave's trailing end. It could be said that now the hype wave is over, people can get real stuff done in the language.

Especially considering that the Linux job market is red-hot, and almost all Linux sysadmin job listings I see list Perl as a wanted skill. What exactly causes a language to be declared dead, anyway? Would you say that Fortran or Cobol are dead? Because they are still going strong in their respective niches.

Does Deprecated mean ANYTHING? I used to write Perl programs, some 20 years ago, it was the thing. I wrote thousands of lines of KSH scripts too at that job. Perl it got replaced by a different tool, not that the new tool is better, but because it was new, just like KSH, CSH and BASH are no longer the tools of choice.

As you young whipper snappers exit my lawn, I offer you the following tidbit of knowledge : "Learn from what happened to Perl, and learn as many tools as you can. Where it's not the tools that make the programer good or bad, having the right tool in your toolbox can make a good programer a great one. Be the great one."

Betting the farm on Parrot and then waiting *years* to start implementing the Perl 6 spec is what killed it. Besides, around these parts we wait for Netcraft to confirm. We haven't succeeded in killing off the *BSDs yet have we?

Tool for the job and all that. If I had to maintain some code, I'd prefer perl with "use strict" over any of the newer OO languages. At least when you're looking at bad code, you can usually salvage something from structural code. I've seen some atrocious Ruby programs lately.

Most of the time you're maintaining code you're maintaining bad code, though, and it's pretty rare that I run across a perl program with "use strict" turned on. But if I don't see it, I at least know what I'm up against. The newer languages need a similar "A bad programmer wrote this" flags.

If Perl really isn't dead yet, could we please put it out of its misery and shoot it? Then drive a stake through its heart, burn it, encase the ash in cement, and then bury it in a silver urn, just to make sure that it will never, ever come back?

Perl was designed as a powerful, flexible, loosely typed scripting language for munging text files and streams, and that's exactly what it is.

It's great for those scripts that you write for a particular task and never use again after the few days it was necessary. It's also good for writing glue code on occasion, to tie the inputs and outputs of other applications together, and when shell scripting just won't quite cut it.

The trouble was that it was such a useful scripting language people started writing applications in it. Then they had to jump on the object-oriented bandwagon, which was done clumsily. Sort of like gluing a dog to your horse so it can fetch. And yes, it can be difficult to read, but it doesn't have to be.

Use Perl for the tasks it was originally designed for. If you're going to write real applications, use a more appropriate language. Don't kick your dog because he can't sing.

Perl was designed as a powerful, flexible, loosely typed scripting language for munging text files and streams, and that's exactly what it is.

Perhaps it's not Perl that died, but the philosophy of Perl - the need for a *wicked fast* scripting language to code up 1-100 lines of code gluing together entire systems. The philosophy of which is power, speed, massive flexibility (very very loosely typed language, you could demo complex data structure creation on the fly using the REPL) which empowered the lone programmer, not the IT department or enterprise software firm.

The diminishing of Perl is indicative of the wild wild web being tamed, and the

All traction was lost when Perl 6 became some amorphous goal, and nobody gives a damn any more. Personally, I think this is a shame -- but I've found Python and Ruby to be more-than-acceptable replacements. (Honestly, I think Ruby is the cat's pajamas, aside from regex speed on 100+ MB logfiles.)

So... does Perl wish to make a comeback? It really would be fairly easy:1) Have Larry Wall take the reins well-and-truly again.2) Give a timeframe for a for-real reference release of Perl 6. Not this sort of wish-wash "everything that says it's Perl 6 *is* Perl 6" thing. Choose *one* of the projects, and have it be the reference against which all others are measured.3) Give direction and make it public. While associated clearly with #1, merely taking the reins won't do the job -- it has to be clear that Perl is *GOING* somewhere, and not just stagnating. And this has to be made known.

There are plenty of sysadmins who learned Perl when it was 5.x, and who have fond memories of it. Give them something more than memories to work with, and you may well go somewhere. As it is? I just couldn't be bothered to care. Gimme Ruby.

Just my personal experiences. Back in 90s I was working for BBN Planet, in a group monitoring network traffic within AS1 (which is *us*). I have inherited a set of tools written in Perl which I had to maintain. Prior to that I had some moderate experience with Perl. So, when I started going through the code, I've found it sufficiently obfuscated to give me a head ache. I guess my predecessor was one of those "Perl kids who like to have fun", not understanding that production environment means, among other things, readability and maintainability. OK, fine. Roughly at the same time the administrator of multiple machines running that code (I think it was Solaris) decided to move from Perl 4 to Perl 5. That broke lots of scripts. So I decided to save time, found out what the functional specs were (from those who actually used those tools) and rewrote lots of the code just from the scratch. Because I was under some serious time pressure, I didn't care too much about either readability and maintainability either. Just to get something out of the doors, and - let my successor suffer just as I did.

Well, BBN Planet, as we all know, is a history, but Perl, unfortunately, isn't. At least it is steadily loosing ground to Python and for reason. Cheers.

The second half of the nineties was a bad scene for code readability all around, or did you somehow not notice the Herman Miller office furniture bubble?

There was a lot of Perl written during this era. Perl was the only language that could keep up with the Vogon rapture of all things brick and mortar. The ferryman threw in the towel, auction off his ferry on eBay, bought two cords of

Sure - it's way down on the TIOBE index, and Perl 6 has been in production longer than Duke Nukem Forever, and there is a ton of "legacy" code that is written in Perl, so why do we say it's "dead"?

Because of the lack of new projects being done with it. I can't remember the last time a [major] web site or web framework was done in Perl. It seems like the whole "ruby on rails" fad is over, but even things like Django (Python),.NET, Java, PHP, and even stuff like "Go" have stolen Perl's Thunder on the Web front.

Well what about as your standard workhorse for script kiddies? Seems like Python has cleaned Perl's clock. For me - I've been a die-hard Perl guy for 10 years. The past couple years, I've worked with many different technologies such as 2d/3d CAD projects, Blender (3d adnimation), Inkscape (2d illustration), GNU Radio, OpenStack (cloud), and even Amazon AWS [libraries]. You know what was the striking commonality to all of these? They were done in Python.

Tiny exception was in the last case (above - Amazon AWS libraries) had several different language options but had *NO* Perl options whatsoever. So the language that was once so revolutionary because of the abundance of CPAN libraries available for it starts to not have newer libraries built/ported to it. Furthermore, binding stuff to Perl can be difficult. So much so that most modern distros will make their own "Perl library" [RPMs] - and one of the reasons being is that a standard CPAN module installation won't work due to problems linking/binding/building across all these different environments with very different prerequisites. Most third party Python stuff I have acquired is most often "native python", and works across all types of exotic platforms - even on iOS and Google App Engine.

As for me - I had to switch away from my beloved Perl over to Python for the aforementioned reasons. There are still several things I miss very much - the abilities to so easily spawn and fork "helper" processes, the ease it which it integrates regular expressions, how it can manipulate files, etc. All these things *can* be done with Python, they're just integrated into Perl much better IMHO.

It seems like Perl 6 was supposed to use something similar to Java's "JVM" microcode interpreter. This could have been a possibility to run Perl in embedded sandbox-type environments (like parking meters and smartphones), but it never happened.

So, I do believe Perl is dead. I miss it for what it was, what it is, and what might have been!

I can't remember the last time a [major] web site or web framework was done in Perl.

Oh, I dunno, how about booking.com (about) [booking.com]? 'World's leading online accommodation provider' where 650K rooms a night are booked (they're owned by Priceline group, if that's a more popular brand where you live)?

A YAPC talk [youtube.com] by one of their employees says 99% of their code is Perl. Check out their dev blog [booking.com].

Frankly, this is the EXACT sort of shit coding that made me hate Perl and glad to see it go. Because I have seen so many examples of coding not too dissimilar to that. With Perl it has always seemed there is an ongoing contest among developers to see how arcane and unreadable they could make their code to show their "cred".
Perl can go to hell, it's developer base can go fuck themselves and frankly the world will be a much better place as soon as that language is dead.

A language that is expressive enough to allow you to write code that is concise and understandable (but no more concise. Cutting out verbosity is only good when it improves legibility) is going to give you enough of a dialect to make some truly twisted and illegible statements that are, nevertheless, still valid code.

I don't think we should blame the language for being powerful enough that an evil programmer can be unfathomably evil, if it also enables a just programmer to be eminently understandable.

You can write C-code obscurely too. But, somehow, Perl seems to encourage this sort of thing... 20 years ago my CS-professor dismissed Perl as a "write-only" language — since then my conviction of him being right has only grown.

Perl remember originated with short system automation scripts a replacement for Sed and AWK. It wasn't uncommon for a Perl script to be one line

perl -e... in a shell script.And then of course a replacement for shell scripting. Perl handled 20 line programs wonderfully. But what works well at 20 lines doesn't work so well at 2000 lines. Perl took on new problem domains.

You can write C-code obscurely too. But, somehow, Perl seems to encourage this sort of thing... 20 years ago my CS-professor dismissed Perl as a "write-only" language — since then my conviction of him being right has only grown.

I understand but disagree. Any language can be a write-only language if you don't care about maintainability. Then there are the wannabe gurus that save 3 lines of code not to shorten the program but to impress others. Even worse, there are people that criticise readable code for it being too simple. If you ever worked in a team of programmers with varying skills then you appreciate simple, readable code. You also will once you had to take over unreadable code.

Absolutely. I wrote in Perl for a year. I gave up when I figured out I couldn't understand pieces of code I'd written a month prior.

And another issue for me was this whole There's More Than One Way To Do It philosophy which I find extremely frustrating. Write a piece of code in 20 lines and show it on usenet. Somebody writes it in 10. Then another one pipes up in 3. Then the true Guru comes up with a one-liner that nobody can grok. And they all run faster. Maybe.

It also mean that when you read somebody else's code, you have to pattern that you can recognize. In C if I have to go through an array, you can bet there's gonna be a loop. In Perl, mystery, it could be any of multiple and rarely used constructs. The thing that made Perl popular at once was the integration of regular expressions, but we now have this in Bash =~, so why bother ?!?

I agree that this (truncated) example is terrible, but it's clearly obfuscation for obfuscation's sake. If you manually insert whitespace and newlines, the above example is easy to read except for a few deliberate obfuscation techniques like hard-to-follow operator chaining and nested assignment.

Most modern languages allow operator chaining, so things like "$t ^= $c ^= (...) " are not a problem with perl per-se. To make this more readable, all you have to do is decompose it into its component operators, following the rules of operator precedence: "{ $c ^= (...); $t ^= c; }". Most modern languages also allow nested assignment, so things like "if ((@a =...)[20] & 48)" are allowed. Again, if you want to make it more maintainable, you can write it as: "@a =...; if (@a[20] & 48)". Once we've removed those types of issues from your example, you're only left with issues related to lack of pretty-printing (includes the fact that nobody but Larry Wall truly understands perl's operator prededence rules), and some surprising things that happen because of implicit variables and dynamic scoping.

IMHO perl's greatest fault is that there is no round-trip-capable pretty-printer. If Perl shipped with a pretty-printer, and if that pretty printer included an option to explicitly parenthesize operators and insert omitted implicit variables, then people could use the tool to read and understand poorly-written perl-snippets, and the only real fault left would be the fact perl uses dynamic scoping by default.

I agree that this (truncated) example is terrible, but it's clearly obfuscation for obfuscation's sake. If you manually insert whitespace and newlines, the above example is easy to read except for a few deliberate obfuscation techniques like hard-to-follow operator chaining and nested assignment.

Most modern languages allow operator chaining, so things like "$t ^= $c ^= (...) " are not a problem with perl per-se. To make this more readable, all you have to do is decompose it into its component operators, following the rules of operator precedence: "{ $c ^= (...); $t ^= c; }". Most modern languages also allow nested assignment, so things like "if ((@a =...)[20] & 48)" are allowed. Again, if you want to make it more maintainable, you can write it as: "@a =...; if (@a[20] & 48)". Once we've removed those types of issues from your example, you're only left with issues related to lack of pretty-printing (includes the fact that nobody but Larry Wall truly understands perl's operator prededence rules), and some surprising things that happen because of implicit variables and dynamic scoping.

IMHO perl's greatest fault is that there is no round-trip-capable pretty-printer. If Perl shipped with a pretty-printer, and if that pretty printer included an option to explicitly parenthesize operators and insert omitted implicit variables, then people could use the tool to read and understand poorly-written perl-snippets, and the only real fault left would be the fact perl uses dynamic scoping by default.

The language itself moderately encourages unreadability, but I think the language itself is not the only problem. Even with pretty printers, there's a separate problem in that the perl community tends to even more strongly encourage language efficiency over code readability, and encourages leveraging the language's most powerful, but least readable syntax. That can't be pretty-printed away. In fact, in my experience self-taught perl programmers start off writing fairly readable code, if for no other reas

While I do not particularly care for perl... shit programmers will write shit code in whatever language they are given. It isnt the language's fault they are shit programemrs. (though languages like perl are more than happy to give programmers as much rope as they would like)

My real problem with perl is that the fucking camel advocates bad programming style and hard to write code. I think snippets like yours come about because first time programmers read the camel and instantly became bad programmers. Larry

A lot of best practices for Perl are good programming practices in general. Of course there are (plenty) of exceptions, but that's the case with other languages as well. One thing one wants to avoid is to program Python in Haskell or Pascal in C, for example.

As for hard to read (for a beginner) have a look at Haskell, for example.

Python's fame is that it "reads like pseudocode". That's nice, but utterly fails if a programmer has no good feel for algorithms. Pascal used to have the same fame. A few years bac

I completely agree. I choose not to handle a "more powerful language" because I don't want to have to remind myself how the language works every time I go back to edit a script I wrote four or five years ago: I want to grok it completely in one glance. Bash has done that for me. I'm sure Python will in years to come. Perl doesn't have any compelling features for me any more.

That and the Perl community is good about taking upstream patches, has CPAN and a faster, cleaner implementation. Ignoring syntax, Python's got some ugly code in the implementation and it's touchy and irritating to port.

I actually got into Perl because I tried to port Python and Ruby. When you see what's under the hood, it really makes you love Perl. I've migrated from PHP to Perl for scripts and web stuff in the last few years and I find it much less frustrating. The problem is no longer how am i going to