Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Perl 5.16.0 Released

samzenpus posted more than 2 years ago | from the check-it-out dept.

Perl 192

An anonymous reader writes "Perl 5.16.0 is now available with plenty of improvements all around. You can view a summary and all the change details here. With Perl on an annual release schedule, and projects like Mojolicious, Dancer, perlbrew, Plack, and Moose continuing to gain in popularity, are we in the middle of a Perl renaissance?"

Sorry! There are no comments related to the filter you selected.

Whatever happened to Perl 6? (5, Interesting)

BitterOak (537666) | more than 2 years ago | (#40069361)

I love Perl, but I'm curious. Whatever happened to Perl 6? I remember hearing about it way back when I was in grad school, which was a long time ago.

Re:Whatever happened to Perl 6? (1)

Anonymous Coward | more than 2 years ago | (#40069413)

That is a very good question!

https://en.wikipedia.org/wiki/Perl_6

Re:Whatever happened to Perl 6? (1, Troll)

Jeremiah Cornelius (137) | more than 2 years ago | (#40069609)

Make no mistake, despite those who'd predict an "Epoch fail", Perl 6 is the future - and it always will be.
The fate of Perl 6 is tied to that of IPv6. Widespread adoption of each is expected at the same rough timeframe.

Renaissance? (-1, Troll)

AliasMarlowe (1042386) | more than 2 years ago | (#40069657)

Renaissance? Please don't tell us that PERL has been "born again". It's not stupid enough for that...

Re:Renaissance? (2, Funny)

Jeremiah Cornelius (137) | more than 2 years ago | (#40069743)

Who said anything about dagos and cathedrals? That's a bazaar inference!

Re:Renaissance? (1)

budgenator (254554) | more than 2 years ago | (#40070663)

Who said anything about dagos and cathedrals? That's a bazaar inference!

Well played Sir, well played indeed!

Re:Whatever happened to Perl 6? (0)

Anonymous Coward | more than 2 years ago | (#40070117)

You mean "epic", not "epoch". Fail!

Re:Whatever happened to Perl 6? (1)

Jeremiah Cornelius (137) | more than 2 years ago | (#40070187)

Nooooooo.... [wikipedia.org]

Re:Whatever happened to Perl 6? (0)

Anonymous Coward | more than 2 years ago | (#40070349)

woosh

Re:Whatever happened to Perl 6? (1)

Jeremiah Cornelius (137) | more than 2 years ago | (#40069785)

Oh, BTW: Hey, Perloids! Thanks for the unecessary version precision! I had a whole surplus of ".0"'s hanging around, clogging the undersides of my keyboard. Now I can disperse them, almost at will in referencing this release. :-)

Re:Whatever happened to Perl 6? (1)

Crypto Gnome (651401) | more than 2 years ago | (#40071961)

Sorry folks, this version "number" as described in the above article is actually an artefact of Zero Terminated String (mis)representation.

The ACTUAL version is correctly displayed 5.16.

Re:Whatever happened to Perl 6? (0)

Chemisor (97276) | more than 2 years ago | (#40069429)

The same thing that will happen to Windows 8.

Re:Whatever happened to Perl 6? (0)

Anonymous Coward | more than 2 years ago | (#40069531)

It will eventually be released on time? Seems like the opposite of what is happening with Perl 6.

Re:Whatever happened to Perl 6? (2, Informative)

Anonymous Coward | more than 2 years ago | (#40069435)

Perl 6 is quite a departure, with many breaking changes from 5. People had code written in 5, and 6 became moored in WIP status for the last 6-x years.

Re:Whatever happened to Perl 6? (5, Interesting)

vlm (69642) | more than 2 years ago | (#40069557)

became moored in WIP status for the last 6-x years.

12 years, not 6.

The killer is no one in the perl dev community wants it. This says it all "Backward compatibility with earlier versions of Perl is not a goal". The problem is I don't love perl because of its syntax, although some of it is pretty cool, I love it because of the CPAN which does all my work for me. All my problems seem to be solved by combining at most ten or so CPAN modules. Its kind of like how the whole world is built out of only a hundred or so elements... if I wrote a perl program that used 100 CPAN modules, the result would be a new universe would spring into being, like the big bang. Or something like that.

Re:Whatever happened to Perl 6? (0)

Anonymous Coward | more than 2 years ago | (#40069641)

I am convinced that if they called it "Butterfly, from the minds which brought you Perl", it would be out the door already

Your sig (-1, Troll)

JOrgePeixoto (853808) | more than 2 years ago | (#40072231)

Check out what lack of religion did to the Soviet Union, China, Vietnam, Cambodia, Cuba, and others.

Re:Your sig (1)

bill_mcgonigle (4333) | more than 2 years ago | (#40072333)

Check out what lack of religion did to the Soviet Union, China, Vietnam, Cambodia, Cuba, and others.

No doubt totalitarian socialism had nothing to do with their outcomes, though.

(an all-powerful State can't tolerate any parallel power structures, such as a Church)

Re:Your sig (0)

Anonymous Coward | more than 2 years ago | (#40072519)

Communism was their religion. State mandated.

Re:Whatever happened to Perl 6? (1)

bill_mcgonigle (4333) | more than 2 years ago | (#40072317)

"Backward compatibility with earlier versions of Perl is not a goal".

Have listen to the FLOSS Weekly interview with the fellow working on Rakudo. They do intend to get perl5 modules running.

Re:Whatever happened to Perl 6? (5, Funny)

vlm (69642) | more than 2 years ago | (#40069439)

The problem with trying to do absolutely everything is it takes awhile to implement.

http://perl6.org/compilers/features [perl6.org]

Its kind of like that Arthur Clarke story "The Nine Billion Names of God". If, one night, you glance at the sky and see the stars start going out, you'll know that someone has finally implemented all the Perl6 features. Either that, or its cloudy and going to rain.

Re:Whatever happened to Perl 6? (2)

cant_get_a_good_nick (172131) | more than 2 years ago | (#40069663)

This scares me. The fact that there are two compilers (which sows confusion) and none is feature complete... and it looks like Parrot was dropped.

This is beginning to look like the HURD. A lot of thrashing around for cool features, nothing ever released.

Re:Whatever happened to Perl 6? (4, Informative)

chromatic (9471) | more than 2 years ago | (#40069721)

If that scares you, cover your eyes: there are more than two compilers.

... it looks like Parrot was dropped.

Not exactly. The Rakudo (Perl 6 on Parrot) people want to write a VM independence layer and port that to multiple VM backends.

Don't ask me to explain that.

Re:Whatever happened to Perl 6? (4, Informative)

Surazal (729) | more than 2 years ago | (#40069525)

I love Perl, but I'm curious. Whatever happened to Perl 6? I remember hearing about it way back when I was in grad school, which was a long time ago.

Perl 6 isn't dead, per se. A quick google search shows that there are a few implementations running around, although none are even close to production-ready yet. Here's the Perl 6 portal [perl6.org] , in case you were wondering.

I did run and download one of the more complete implementations, and part of the problem I think is that perl 6 is not ANYTHING like perl 5. The reason I use perl at all, and the only reason I still use perl 5 TO THIS DAY is the regex capabilities. They completely ripped that out of perl 6 and re-implemented it to make it more user-friendly, and they did so poorly, IMHO. Instead of calling htis perl 6, they should have named it something completely different. Call it "perl" does a disservice to what made perl so powerful in the first place.

Re:Whatever happened to Perl 6? (5, Interesting)

chromatic (9471) | more than 2 years ago | (#40069691)

... part of the problem I think is that perl 6 is not ANYTHING like perl 5.

The parts of Perl 6 I like are a lot like Perl 5, and the parts I really like are much better than Perl 5.

... the only reason I still use perl 5 TO THIS DAY is the regex capabilities. They completely ripped that out of perl 6 and re-implemented it to make it more user-friendly, and they did so poorly, IMHO.

I like Perl 6 grammars far, far more than I like Perl 5 regex. That's one of the best parts of Perl 6. Regex as borrowed from Unix and enhanced over the years have accumulated a lot of mutually incomprehensible cruft. Perl 6 cleans that up.

The problem with Perl 6, of course, is that no implementation is anywhere close to practically useful. Almost twelve years after the Perl 6 announcement, there's still no reason to hold your breath.

Re:Whatever happened to Perl 6? (1)

Crypto Gnome (651401) | more than 2 years ago | (#40072003)

Almost twelve years after the Perl 6 announcement, there's still no reason to hold your breath.

The real reason why Perl6 hasn't been completed ready for production is that some aspects are dependent on (some of) those same people who are holding their breath.

Re:Whatever happened to Perl 6? (5, Interesting)

zmughal (1343549) | more than 2 years ago | (#40069773)

As far as the matching capabilities of Perl 6, I think they're trying to do something that will advance the state-of-the-art in terms of programming langauge integration in the same way that Perl 5's regex did. The Perl 6 rules [wikipedia.org] are similar to the tricks [p3rl.org] and hacks [p3rl.org] that people do with regular expressions to build up full grammars. By separating out the parts into logical components, you will get better readability and reusability. Not only will we get cleaner text processing, but this (along with the VM architecture) will aid the development of DSLs that will extend the language into an exciting future.

Yeah, it's some good Kool-Aid and the Perl community been waiting for a while, but bringing these ideas into a production-ready language isn't trivial. I'm still using Perl 5 because of CPAN, but I feel that Perl 6 will eventually get to the same level especially with a source-to-source compiler. The hardest part would be dealing with native-code bindings.

Re:Whatever happened to Perl 6? (1)

skids (119237) | more than 2 years ago | (#40071233)

As far as the matching capabilities of Perl 6, I think they're trying to do something that will advance the state-of-the-art in terms of programming langauge integration in the same way that Perl 5's regex did.

It's also one of the more functional feature sets already. Very useful if speed is not your priority.

For people that actually enjoy learning new things rather than endlessly traversing the March of Progress [dipert.org] , following Perl6 development is very refreshing.

Re:Whatever happened to Perl 6? (0)

Anonymous Coward | more than 2 years ago | (#40069559)

Perl 6 is still being worked on, but it's more of a proving ground for new features and new ideas. It'll be ready when it's ready. Meanwhile, many of the good ideas from Perl 6 have made their way into Perl 5 releases. Useful things such as Moose [iinteractive.com] , smart matching [modernperlbooks.com] , and other things. Hopefully others will reply with more details.

Ahhh (0)

future assassin (639396) | more than 2 years ago | (#40069363)

PERL spend many a night modifying my Everyauction script/site.

erm (-1)

Anonymous Coward | more than 2 years ago | (#40069367)

http://en.wikipedia.org/wiki/Betteridge's_Law_of_Headlines

Re:erm (1)

X0563511 (793323) | more than 2 years ago | (#40070105)

I think you replied to the wrong story.

No (0)

Anonymous Coward | more than 2 years ago | (#40069389)

The Renaissance was characterized by lots of people learning and contributing to a wide variety of ideas, skills, sciences, and arts.

Perl is one language that does things on one kind of device.

Re:No (2)

vlm (69642) | more than 2 years ago | (#40069477)

LOL apparently you've never seen the Perl6 feature list, which can be summarized to "implement every programming concept known to mankind", or the CPAN which is "everything that can be turned into (what amounts to) a library, turned into a library and ready to freely download".

Its the ultimate glue language.

calls C/C++ libraries (3, Interesting)

bzipitidoo (647217) | more than 2 years ago | (#40070763)

Ultimate glue? That's why I'm interested in Perl 6. It's supposed to be able call C/C++ library functions directly. No more need for wrapper libraries, which is the majority of CPAN. No need for SWIG, which I find bloated.

No (-1, Flamebait)

spiffmastercow (1001386) | more than 2 years ago | (#40069441)

Perl is not coming back. Get over it and learn something else.

Re:No (1)

Anonymous Coward | more than 2 years ago | (#40069571)

Is Perl the "Ron Paul" of general purpose scripting languages?

*ducks*

Re:No (5, Insightful)

X.25 (255792) | more than 2 years ago | (#40069615)

Perl is not coming back. Get over it and learn something else.

It never went anywhere, so why would it need to come back?

Re:No (1)

Reality Master 101 (179095) | more than 2 years ago | (#40070983)

I use Perl nearly every (damn) day, on a very old codebase project. There are things about Perl I like, but there are also things that I really despise. Not through fault of Perl, really -- it's simply old, slow (yes, slow) and outdated compared to other modern languages.

There is no way I would start a new project in Perl, and the only people who would are people who are willfully ignorant of the rest of the industry. Perl is beyond its life. There is nothing it does better than other languages, and there are a whole hell of a lot of things it does much, much worse.

Re:No (2)

Junta (36770) | more than 2 years ago | (#40072733)

The reason I like perl is that it is 'good enough' and the people that would screw with it to make it inconsistent are all off on either perl6 windmill chasing or other languages. I will admit to some unfortunate ignorance of ruby, but at least with python, while I find it a commendable language, they have been much more aggressive about incompatible changes than perl5. A program written against perl 5.4 runs fine with perl 5.16. However, in my experience code written against python 3.0 might not work quite right with 3.2 without some tweaks.

In terms of *nix friendly scripting languages, ruby, perl, and python are the only choices with a sufficiently rich set of libraries available to do things.

Besides that, perl is serviceable. It allows programmers to employ unreadable syntax, but coding discipline can mitigate that. Generally poorly readable perl code can be written readably. Part of this is terse syntax to enable simple one-liners in a *nix pipe chain. Python isn't exactly a language amenable to that. However, perl syntax accomodates more verbose, readable style to be comparable to python in more sophisticated scripts. Compare this with awk, which also has excellent properties on CLI, but doesn't scale up to a 'real' program so well.

Re:No (0)

Anonymous Coward | more than 2 years ago | (#40069631)

Hmm. I use perl at least weekly. I might not write many important programs with it, but for the quick and dirty script or one-liner, it is still a useful thing to know. But, yeah ultimately it would be a good idea to broaden ones horizons a bit and pick up another scripting language.

Re:No (0)

Anonymous Coward | more than 2 years ago | (#40069645)

Don't know where you have been, but Perl is the only worthy language for a server.

Anything else is wasted cycles.

Coming back? (1)

Anonymous Coward | more than 2 years ago | (#40069683)

Perl never went anywhere. Sure, it may not be today's new hip fad language, but it's widely used and supported.

Re:Coming back? (0)

rubycodez (864176) | more than 2 years ago | (#40071857)

it's just used for legacy things, it is not the choice of new projects, and a dozen years in and still Perl 6 not finished, it's clear Perl is just dying a slow death. It was great in the day, that day being late 1990s.

Re:Coming back? (1)

Junta (36770) | more than 2 years ago | (#40072749)

It is still used in new projects. IMO, Perl 6 being finished probably would kill the language. The reason perl5 is appealing is precisely because people are not screwing around with it in incompatble ways (they are inflicting that on perl6). The stabliity/compatibility, accumulated set of languages, and the fact the syntax is perfectly serviceable makes for a very solid scripting language choice, even for new projects.

Just because some people do not view it as 'hip', doesn't mean it isn't a good, reasonable choice for new development.

Re:No (1)

cant_get_a_good_nick (172131) | more than 2 years ago | (#40069693)

I"m not sure what "not coming back" signifies. We run a decently large Perl codebase. We add some new features (nothing big) new code tends to go to python (though some new perl stuff). But changes in the tools as we maintain the codebase is important to us.

Re:No (5, Informative)

h4rr4r (612664) | more than 2 years ago | (#40069695)

Coming back?

It never left, I used it everyday.

Re:No (2)

doti (966971) | more than 2 years ago | (#40070259)

Right now I am (should be :) writing Perl code, and being paid for it.
And it's a big and important project, not just some utility scripts.

I also write one of my main pet projects in Perl.

Re:No (2)

FrootLoops (1817694) | more than 2 years ago | (#40071483)

Coming back?

It never left, I used it everyday.

Hah, you got modded informative instead of funny.

Re:No (1)

gatesstillborg (2633899) | more than 2 years ago | (#40070189)

Perl is built up with a fair amount of exotic, idiosyncratic constructs, but its core features (datastructures and syntax), do it better than any of them. If you just resist getting sucked into all its esoteric aspects, which some quirky elements (with some questionable motives) seem to push so hard, then you'll do just fine.

"You take what you need and you leave the rest." Robertson (Helm)

Modern Perl book (4, Informative)

Anonymous Coward | more than 2 years ago | (#40069445)

Chromatic's Modern Perl book [onyxneon.com] is also available as a free download. It's useful for Perl programmers who want to know what's new in the Perl world in the last several years.

Hard to get started (0)

Anonymous Coward | more than 2 years ago | (#40069541)

Web development has changed so much that unfortunately you can't get started the way you could back in, say, 1999. I know because I tried it. Tried to go from PHP to Perl and kept running into 1) old Perl stuff with amazing documentation and tutorials and book and 2) new Perl stuff with a confusing mess of advice, opinions, and non-support from framework users. I was really looking forward to learning Perl, but for now I'm sort of stuck with PHP and CodeIgniter due to lots of current documentation and a very generous community.
 
Can some /.er point me down the path toward modern Perl learning? Tried Mojolicious and Dancer and had to bow out; much too complex for me at this point. As I recall, the Dancer blog example was set up in such a way (using hashes, or something like that) that it was hard for a beginner to understand and extend.
 
I'm also currently using a bit of Python and C, but deploying Python web apps is a gigantic pain in the mess.

Re:Hard to get started (5, Informative)

chromatic (9471) | more than 2 years ago | (#40069619)

Can some /.er point me down the path toward modern Perl learning?

I have a bias, but I've had many positive responses to Modern Perl: The Book [modernperlbooks.com] .

Re:Hard to get started (1)

drunkennewfiemidget (712572) | more than 2 years ago | (#40069739)

Slight bias indeed.

The man page to Moose is a good one too.

If you're in to web dev, the Definitive Guide to Catalyst [amazon.co.uk] is a good choice, too.

Unfortunately, I have to write this with a caveat: getting Catalyst and Moose set up can take some time. If you apt-get install/emerge/yum/whatever it, you'll probably get an old version.

If you install it from CPAN, it takes some time, since the two of them combine to require a craptonne of CPAN.

That said, once they're installed, a working catalyst web app you can hack on is as simple as catalyst.pl AppName; cd AppName;scripts/appname_server.pl

Re:Hard to get started (1)

vlm (69642) | more than 2 years ago | (#40069715)

Try some perl development the old fashioned way. Document a list of "PITA" about developing in perl. Simultaneously study at least one framework and slowly enumerate a list of "this is how framework X fixes the Y problem" ah "I know kung fu" or whatever. At some point those lists will converge. Then seamlessly start developing the new way using a framework.

You can also have a lot of fun trying to implement your own homemade framework. Being a text processing language, making a MVC like system isn't too hard. Again, at some point your toy MVC will converge with some perl framework and away you go.

I started doing RoR probably 5, maybe 6 years ago, and I agree, the learning curve for a framework is darn near vertical unless you're doing the overly simplistic demo apps... note demos are selected precisely because they make the framework look good, not because they're realistic. Eventually the insane vertical learning curve flattens out. Just like second semester calculus, sometimes you just gotta gut it out till you get it.

You may be better off forgetting about "web development" which is a pretty huge and complicated solution space. Come back to it later. Go to projecteuler.com and solve a couple simple compsci algorithms in your new language. I am teaching myself Scala at this time, for the heck of it, by implementing the craziest solutions I can to some P.E. problems. I wish I had learned Ruby in full detail before I started to learn RoR, would have been a much smoother learning curve.

Re:Hard to get started (3, Interesting)

vlm (69642) | more than 2 years ago | (#40069757)

Well that was embarassing. you don't want to see projecteuler.com. Try

http://projecteuler.net/ [projecteuler.net]

that works a heck of a lot better.

Re:Hard to get started (0)

Anonymous Coward | more than 2 years ago | (#40070223)

Can some /.er point me down the path toward modern Perl learning? Tried Mojolicious and Dancer and had to bow out; much too complex for me at this point. As I recall, the Dancer blog example was set up in such a way (using hashes, or something like that) that it was hard for a beginner to understand and extend.

Stick with Mojolicious (or Dancer, but I like Mojolicious). There is a learning curve compared to "the old days" - but it's not because these frameworks are hard to use, it's because web development has moved on. Once you have some of the basic concepts down, you'll never look back.

Short answer: No (0)

Anonymous Coward | more than 2 years ago | (#40069565)

If my co-workers are anything to go by, absolutely anything starting with some equivalent of "#!/usr/bin/perl" or that contains the line "use strict;" is ultra-scary double-plus-ungood hate hate hate.

Which is why I'll be employed here as long as I want, since I'm one of the few people who'll do dirty parsing work, and my weapon of choice is Perl. Heh.

But, unfortunately, no, Perl won't pick back up soon. Shame. I sort of like the esoteric chaos of the language.

Re:Short answer: No (0)

Anonymous Coward | more than 2 years ago | (#40069809)

Shame. I sort of like the esoteric chaos of the language.

Exactly. Perl has a real beauty to it. I really find it aesthetic, fast and stimulating to code with and there's virtually no capability that cannot be found pre-written as a module in CPAN. But oh no, now we all have to use fucking Python with its white space syntax.

Re:Short answer: No (2)

Junta (36770) | more than 2 years ago | (#40072767)

What's *really scary* is a perl script with '#use strict;'. Meaning they tried to use strict; but gave up on it.

Like Perl, but Python dominates (2, Insightful)

Anonymous Coward | more than 2 years ago | (#40069707)

.. for prototyping and scripting. I'm a non-coder working for a software house with highly experienced coders. I taught myself Perl and C. But none of these guys will use Perl. For anything. All they will use for scripting and prototyping is *Python*. They make the usual cliche jokes about Perl being unreadable etc. I'm really beginning to think that I wasted my time learning Perl.

Re:Like Perl, but Python dominates (3, Insightful)

ThePhilips (752041) | more than 2 years ago | (#40070327)

All they will use for scripting and prototyping is *Python*.

NOT using Perl for prototyping IME is a good thing.

Many of my program and libraries begin their life as proof-of-concept in Perl. And the problem is that from Perl implementation it is pretty much never possible to devise how much time it would take to implement C/C++/etc equivalent.

I had totally bad cases like where I have spent 2 weeks writing a library in C++ for which Perl's equivalent took me only 30 minutes. As a proof-of-concept, Perl implementation could be a quick hack - but C++ has to be a production quality. With the vast utility of Perl many corner cases seem trivial and work easily without performance regressions - while in C/C++ one ends up feeling like reimplementing the wheel for every one of them.

Perl is BAD for prototyping for C and C-like languages IMO. The difference between the languages and the libraries is way too great.

P.S. I'm not sure how better it is in Python. It should be better: the utility of the Python is much more limited compared to the Perl.

Re:Like Perl, but Python dominates (1)

Junta (36770) | more than 2 years ago | (#40072783)

Basically, most of any scripting language pretty much makes you throw out the codebase when you go to C. Exploring a concept to assess feasibility can work, but don't expect to not have to nearly start over, just with the benefit of knowing which algorithms/development paths just won't pan out.

Re:Like Perl, but Python dominates (1)

flargleblarg (685368) | more than 2 years ago | (#40073365)

Perl is BAD for prototyping for C and C-like languages IMO. The difference between the languages and the libraries is way too great.

That is a really really really really really lame reason not to use Perl, IMHO.

Re:Like Perl, but Python dominates (1)

rduke15 (721841) | more than 2 years ago | (#40070861)

Whether you wasted your time depends on whether you can use what you learned occasionally, or whether you had fun learning it. But anyway, learning anything is seldom a waste of time.

If your coders know several languages, and happen to not like Perl, that's OK. But if they know only a single language and really never use anything else, they are just not very competent and probably also quite boring.

Bunch of stuck up nannies (5, Insightful)

cheekyboy (598084) | more than 2 years ago | (#40071205)

If they write their own code, its unreadable?

Fire them.

Its easy to write code in perl that looks like C and is readable, and still fast. (Often faster than java btw)

Yes, using shortcuts and lots of login in one line is cute, but its horrible to read, so DONT do it.

Jumping the Ruby ship (0)

Anonymous Coward | more than 2 years ago | (#40069713)

Everyone who switched from Perl to Ruby found out that Rubyist's (OK, Rails-ists really) are arseholes and are now returning to Perl.

Re:Jumping the Ruby ship (1)

Aighearach (97333) | more than 2 years ago | (#40072899)

Every single one, or just you?

Parallax (5, Insightful)

hessian (467078) | more than 2 years ago | (#40069791)

We're seeing Perl as having moved because we have moved. Perl has kept doing what it has always done at a high level of excellence.

The market shifted. First, many Perl programmers shifted to PHP once the net decided security and economy of processing power were not goals on the table. Second, a lot of newer programmers are reliant on frameworks and other pre-built systems and learned the languages that go with those.

However, among those who've just kept making things work for the past 15 years, Perl remains alive and well. It is still the fastest way to get the widest range of tasks done. And if you don't code like an obscurantist maniac, it's easy to maintain.

It may look to us like Perl went away, but what really happened was an infusion of other people and trends. Now that the free money from a dot-com booming economy has gone away, Perl is shining through once again as the reliable and powerful option that it is.

Re:Parallax (1)

Eil (82413) | more than 2 years ago | (#40072049)

The market shifted. First, many Perl programmers shifted to PHP once the net decided security and economy of processing power were not goals on the table. Second, a lot of newer programmers are reliant on frameworks and other pre-built systems and learned the languages that go with those.

Do you maintain the website linked as your home page? If so, what's it running under the hood [deathmetal.org] ?

I remember when I turned 5.16... (1)

Sez Zero (586611) | more than 2 years ago | (#40069813)

Boy, a sweet five-16th birthday! Happy congratulations, Perl!

So what to get a language for their 5.16th? A new Car-p? Or maybe an actual car from Dad's dealership [perlauto.net] ?

Perl's strength (5, Interesting)

Okian Warrior (537106) | more than 2 years ago | (#40069833)

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

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

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

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

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

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

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

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

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

@Files = <c:/Windows/*.exe>;

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

Re:Perl's strength (2, Interesting)

Anonymous Coward | more than 2 years ago | (#40069955)

Well put. Except perhaps for the part about C++ being "easy" to learn. C++ is a fucking mess.

Re:Perl's strength (1, Informative)

Anonymous Coward | more than 2 years ago | (#40070131)

Perl was written by a linguist, not an engineer.

And that engineer loved Latin, not Esperanto.

The following single line:

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

In Python is:
lines.sort(key=lambda o: o.name) # for inline sorting, or
lines = sorted(lines, key=lambda o: o.name) # mimicking the perl idiom

@Files = <c:/Windows/*.exe>;

In Python is:
from glob import glob
files = glob("c:/Windows/*.exe")

In other words, Python is just like Perl, only it is readable and makes sense.

Re:Perl's strength (2, Insightful)

Anonymous Coward | more than 2 years ago | (#40070201)

In other words, Python is just like Perl, only Python fans are deluded into thinking the Python way of doing things is the only viable way.

Fixt.

Re:Perl's strength (2, Insightful)

doti (966971) | more than 2 years ago | (#40070303)

sorry, I tried many times to copy/past these so called python code, and then never work.

yes, relying on white space is a stupid idea.

Re:Perl's strength (1)

Anonymous Coward | more than 2 years ago | (#40070495)

The fact that Python doesn't auto-glob is kind of retarded. The default should be to glob, and to provide a way to disable that if you have a good reason.

Re:Perl's strength (3, Interesting)

skids (119237) | more than 2 years ago | (#40070847)

In other words, Python is just like Perl, only it is readable and makes sense.

Funny, I found the perl easier to read.

Re:Perl's strength (1)

Anonymous Coward | more than 2 years ago | (#40071717)

In Python is: lines.sort(key=lambda o: o.name) # for inline sorting, or

What's lambda?

In Python is: from glob import glob files = glob("c:/Windows/*.exe")

It doesn't glob by default?

Re:Perl's strength (0)

Anonymous Coward | more than 2 years ago | (#40072425)

In what universe does

"lines = sorted(lines, key=lambda o: o.name)"

come close to the obviousness of

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

Certainly not in this universe.

Python is many things. Easier to comprehend than Perl? Not even close. It isn't.

Re:Perl's strength (1)

gullevek (174152) | more than 2 years ago | (#40072483)

Except that perl has an enormous amount of CPAN libraries that are often vast superior. Just take the perl interface to postgresql. No other language has such an perfect interface than perl.

Re:Perl's strength (0)

Anonymous Coward | more than 2 years ago | (#40071515)

If you want expressive, check out the perl script at

http://www.99-bottles-of-beer.net/language-perl-737.html [99-bottles-of-beer.net]

The source code is an illustration of the output.

Re:Perl's strength (0)

Anonymous Coward | more than 2 years ago | (#40071863)

Both examples can be easily and beautifully done in a language which supports lambda expression and generator - and it would be more generic and readable, and allow even more complex operations than string handling.

You can now do things in C# like that:
var addUserCmds = Directory.GetFiles("C:/UserLists", "*.txt").SelectMany(file => File.ReadLines(file)).Select(line => pattern.Match(line).Groups).OrderBy(user => user["name"].Value).Select(user => new SqlCmd("insert into User values (@name, @age)", user["name"].Value, user["age"].Value))
ExecuteAllCommandsInTransaction(conn, addUserCmds); // note the files are not actually read and parsed until ExecuteCmdsInTransaction finishes previous commands, during the entire process you'd not get things like an array of one million lines representing all the data

it renders most script languages useless IMHO. You just have to write all the *shortcuts* first because there are very few official ones taking advantages of these new features.

Re:Perl's strength (0)

Anonymous Coward | more than 2 years ago | (#40071965)

Fix: the comment was wrong - OrderBy() would actually cause the pipeline to materialize into a List/array. You have to know all details for it to work smoothly, especially when it's complex...

PS: My colleagues hate it when I write code like that

Re:Perl's strength (1)

Eil (82413) | more than 2 years ago | (#40072125)

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

I'm not disagreeing with this in any way, but an expressive language which does a lot in a single line of code by definition means that it's harder for humans to read. And readbility is (in my opinion) directly proportional to maintainability. This is, perhaps, why Perl is sometimes derided as write-once, read never.

I don't know if heard this maxim somewhere else, but I think it's pretty accurate: You'll never understand a line of code as clearly as the moment you write it.

Perl renaissance? (2)

Fished (574624) | more than 2 years ago | (#40069905)

are we in the middle of a Perl renaissance?

I hope not. I have to maintain a large body of Perl code at work, and it's a nightmare.

Re:Perl renaissance? (5, Insightful)

kwoff (516741) | more than 2 years ago | (#40070285)

Have you maintained any (large) body of code that isn't a nightmare?

Re:Perl renaissance? (0)

Anonymous Coward | more than 2 years ago | (#40071177)

are we in the middle of a Perl renaissance?

I hope not. I have to maintain a large body of Perl code at work, and it's a nightmare.

Perl Medic [amazon.com] to the rescue!

There will be no Perl renaissance (0)

Anonymous Coward | more than 2 years ago | (#40070811)

Sorry, Perl fanboys, but Perl is dead. Not only has it been eclipsed in the web domain by PHP, J2EE, ASP.Net, Ruby on Rails, and others, but in the scripting domain it has been overtaken by Python. Perl's mindshare has plummeted in the last 10 years or so, and it's only going to get worse as all the new CS grads are much more interested in functional languages, e.g. Haskell; to these people Perl seems like an example of terrible language design. Perl more and more appears to be used mostly by some old neckbeard diehards who haven't kept up with recent developments in programming.

So yeah, of course some people are still using Perl, just as some people are still using Tcl. But overall you can stick a fork in it; Perl's dead.

Re:There will be no Perl renaissance (2)

chromatic (9471) | more than 2 years ago | (#40070885)

So yeah, of course some people are still using Perl....

We call that the CPAN, and it's the opposite of plummeted.

Re:There will be no Perl renaissance (0)

Anonymous Coward | more than 2 years ago | (#40070903)

Wow, talk about being in denial...

Re:There will be no Perl renaissance (1)

chromatic (9471) | more than 2 years ago | (#40070975)

If you're interested in facts, feel free to provide measurements or statistics to prove me wrong.

Re:There will be no Perl renaissance (0)

rubycodez (864176) | more than 2 years ago | (#40071881)

Facts? what widely used "new" project in the last five years has chosen Perl? there are plenty of examples for Python, Ruby, Java/J2EE, Objective C, C, C++, C Sharp.....but Perl is dying. Larry killed it wasting his people's cycles with Perl6. Perl is washed up, a has-used, used-to-was. RIP Perl.

Re:There will be no Perl renaissance (1)

chromatic (9471) | more than 2 years ago | (#40072067)

... what widely used "new" project in the last five years has chosen Perl?

I've deployed a few projects in the last five years. I know many people who've also deployed projects.

Re:There will be no Perl renaissance (4, Informative)

Sez Zero (586611) | more than 2 years ago | (#40071755)

Sorry, Perl fanboys, but Perl is dead. Not only has it been eclipsed in the web domain by PHP, J2EE, ASP.Net, Ruby on Rails, and others, but in the scripting domain it has been overtaken by Python.

TIOBE Index [tiobe.com] seems to disagree: Java, C#, PHP, Python, Ruby all down.

Perl right there at 9, same as it ever was: a good tool for people that want to get work done and not chase the hot flavor of the month.

Re:There will be no Perl renaissance (0)

rubycodez (864176) | more than 2 years ago | (#40071889)

Haha, from search engine rankings? that's just annoyed people having to look up old crud. Get over it, Perl is dying, its corpse is stinking. Larry killed it.

Yea Perl (0)

Anonymous Coward | more than 2 years ago | (#40071819)

I love Perl. For quick tasks, utilities, parsers, code generators..etc have no idea what I would do without it. Actually I know I would be wasting much more of my employers time writing this shit in a different language and most likely would just choose to do a lot more shit work manually with increased chance of errors and less automation.

I get to get away with taking shortcuts that would not be advisable in a large project for pennies on the dollar. As much as I love Perl I'm not sure I would trust myself enough to use it in a huge project unless I forced myself not to use certain features.

Many reasons to use Perl (1)

Anonymous Coward | more than 2 years ago | (#40072441)

I can think of over 106,000 [cpan.org] reasons to use Perl (and by the way, CPAN [metacpan.org] is still seeing very large [cpantesters.org] numbers of both contributions and contributors).
     

Ruby TYVM (0)

Anonymous Coward | more than 2 years ago | (#40072443)

I used to hack a lot of perl4 then perl5. Then someone invented Ruby. RIP perl.

Perl6 looks similarly cool -- maybe my descendants can hack it someday.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?