“Lately, the Perl language has had less buzz surrounding it than many other languages and development environments, but Perl is still a key component on the Internet. For this guest post, we asked Jeff Hobbs, Director of Engineering at ActiveState, to weigh in on the topic.”
Seven years ago I have read that Com Event support in Win32 module is in ‘alpha’ state, and recently I have seen the same exactly text. Not a big deal, actually. Just note, that it is not going anywhere.
I see two primary reasons perl will be around for a long time. First, you can do a ridiculous amount of work with a very short (single line even) script. Why spend time writing a nice, readable, reusable script/program when you can solve your problem with a quick one-off perl script?
Second, perl is kind of an anything goes language. This makes it an easy second+ language to learn and it’s capable enough to solve most problems. Plus, you can use the best programming strategy for the job to save time.
Agreed. The reasons I see Perl as not going anywhere are: it’s easy, it’s quick to knock something up and it’s extensible via places like cpan.
those two things could also be said of ruby or python…
Yes, why be a professional when you can be a hack?
I worked an OTRS based project last year and that was the first time i ever used perl,i think it is the most versatile languages for webapplications. Had to get used to the syntax but after a few weeks i was comfortable with it.
…but I’ve used it. Actually I wrote a bookmark modifier in perl for a [beta] browser that did not have any bookmarking functionality (yet) a year or two back.
I think perl6 will have some interesting changes… if it is ever in a state for regular use.
It’s developed quite a bit over the decades. I know several engineers who use it for scripting quick solutions to customer requests/problems, etc. It is super powerful with its bajillions of libraries… I think it is sort of like the vi (or emacs, pick your flavor) of the scripting world.
perl6 is sort of the duke nuke’em forever of the programming language world. Been talked about for a decade now, and been “almost ready” for half that time at least.
Yeah. I have perl64/parrot installed… but have not done much with it.
IMO, CPAN and the inertia of existing scripts is all perl really has going for it at this point. If you don’t need that, you either go python or ruby for general purpose scripting nowadays. Not even making a judgement on whether thats a good or bad thing, but it really is the way things are now.
Maybe, if that’s what you’re used to.
Personally I can do more of what I want with a few lines of Perl than the same lines of Python or Ruby.
If I was writing software for long-term use I’d probably use Python or C++.
For some quick code or for analyzing and reporting I’d go with Perl.
The amount of characters is not what counts – rather, the amount of time it takes to write/debug the script, and the amount it will take to modify it later.
Out of curiosity, what aspect of perl makes it preferable to python in this area? Regex support is pretty much the same, so it must be the built in reporting features?
One thing I think makes python preferable to perl even for the “dirty work” is the exception handling. In perl you’ll either implement error handling yourself (“or die”) or fail without explanation.
What makes Perl better for me is that I know it really well. I know the keywords, the functions, lots of libraries and CPAN.
I don’t know Python or Ruby nearly that well.
That means I can sit down and write 200 lines of Perl that work the very first time.
Admittedly I only did that once and yes it surprised me too.
Perl offers some of the most obscure,obfuscated, beautiful and baffling ways to to write a quick script but I’ll be darned if if I knew what I wrote a week from now.
I remember( a long time ago) with four lines of code and between 12 and 20 characters I could change to a high resolution setting for my monitor but it was in assembly. You don’t see me advocating it because it’s brevity.
Python and Ruby are fair comparisons because a skilled programmer in these languages can produce code just as quickly as a skilled Perl programmer but guess whose program you’ll be most likely to understand first time.
Perl just doesn’t lend itself to clarity for the short quick script.
So… someone made bad and undocumented code and that’s language’s fault??
But the difference between Python (and probably Ruby as well) is that, after I get finished writing Python code, I can actually read it 3 months later Sure, it’s possible to write Perl code that isn’t write-only, just as it’s possible to write a Java GUI app that isn’t slow, but when a language makes it extremely easy to do the wrong thing, what can you do?
As for Perl6 not being the successor to Perl5, I’m sure some of you will think me an idiot for applying some common sense here, but WHY CALL IT PERL6 IF IT ISN’T PERL5’S SUCCESSOR? If I could, I would embed an image here of Captain Picard doing the facepalm.
Edited 2010-05-13 01:30 UTC
Blasphemy!! Jeff Hobbs is a huge contributor to TCL. Now he’s in charge doing PERL ?
lol.
It’s easy to get started with Perl. But using it for a large project has quite a few caveats. The major one is maintaining the code, especially if the original author is no longer around. I had exactly that situation. Bunch of obfuscated and undocumented code. And then folks who create Perl — well, they’re just having fun. It looks more like a Church of St. Larry Wall, rather than the project to create a solid language with undustrial strength. Changes from (if I remember correctly) version 4 to version 5 where quite extensive. I ended up with a “Perl programmer’s revenge”. Completely rewrote the code, made it equally obfuscated and undocumented and then left the whole project and subsequently the company.
I’m familiar with Python on fairly superficial level, yet my impression is that it is more restricted, in a good sense, so one Python programmer can read the code written by another Python programmer easier than in case of Perl. That should be one of the reasons I see more and more project around being implemented with Python.