Perl 5.14 Released
chromatic writes "Pumpking Jesse Vincent has just released Perl 5.14, the latest stable version of the venerable Perl 5 programming language. The list of changes in Perl 5.14 includes several enhancements, including performance tuning, Unicode improvements, and updates to the core libraries and documentation. Perl 5.16 is on track for a release next April."
I was just going to say that back in about 2001 someone gave me advice not to learn Perl 5 because a Perl 6 release was imminent.
---Technology will liberate us if it doesn't enslave us first.
Perl 6 is out. But it's a diffent language in the same way that python 3 is not like py 2.7
The thing I really like about perl is it's the shortest oreily pocket reference. it's even shorter than c++. Yet you can do vastly more than python without importing a single lib. that is to say it's surprisingly concise for encompassing such a lot of capabilities in the core language.
Some drink at the fountain of knowledge. Others just gargle.
.... does it have any new operator? :-P
And before you tell, it was just a joke, I know you should now add operators in a minor release.
Why can't
Perl 6 has 140+ different operators! That is absolutely insane. While I support being concise, Perl has far more complexity in the language core than any other language I have ever seen.
Stylish sheet to fix many problems in Slashdot's D3: https://gist.github.com/801524
The more mature a programming language is, the harder it is to extend it. Mature languages have vast codebases that must be supported, and substantive changes break legacy support. That's why it's best to get it right early on.
Help stamp out iliturcy.
Perl makes a GREAT "general-administration" tool. I use it as basically bash++ - it's the best way,bar none, to write programs on the command-line. There's a reason even the ultra-minimalist OpenBSD includes Perl in the default install.
Python 3 is barely different from Python 2. It is not backwards compatible, but I've ported Python 3 programs to Python 2 (when I realized I had to use SciPy or run the code on a system with only Python 2), and nearly the only changes I had to make were changes for // for integer division and required () for print -- and these changes were trivial if I could simply import from __future__. In contrast, Perl 6 is very different from Perl 5.
What a fool believes, he sees, no wise man has the power to reason away.
We still use Perl to develop our products (commercial and open-source.) Perl may be maligned, but it's still a good tool for a lot of purposes and if you pick and choose carefully, CPAN is an awesome resource. Perl has modern frameworks (eg, Catalyst) for Web development that are competitive with anything out there, and DBI is superior to most alternative languages' database libraries.
While I'm bullish on Perl 5, I'm not so optimistic about Perl 6. I think it's suffring horribly from second system syndrome and may never see the light of day as a useful production tool.
Excellent troll... really first rate. Did you get federal funding from the Ministry of Trolling for that gem? I've been working professionally in unix/linux environments for about 12 years and believe me perl is still quite alive and well doing real work in lots of different kinds of companies. Php is somewhat painful to code in by comparison but both have their place. Except for java.. it has no sane place but you still find it in use everywhere which just goes to show anything can succeed in this world with enough marketing dollars behind it.
Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats. -HLM
Despite what many are saying, Perl is still used extensively even for new projects. I use it daily, and while I really like ruby and python, for a variety of reasons, I have not switch away from Perl for most projects. My only question is when will Strawberry Perl 5.14 be released?
With Perl, that complexity gives you power. If one does lots of programming, and their mind is in good shape, Perl can be used to rapidly dispatch programming problems.
All I'll say to that is that the entire computing world does not revolve around websites... or programming certification mills. =] Perl is the duct tape that holds the networked world together... and it's not dying any more than actual duct tape is. It's a refined tool used by professionals to do the jobs that have always needed done in a minimum of time and that don't cater to the latest buzz word laden development methodology.
Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats. -HLM
Our entire API framework is Perl and has been for a few years now. Seemed like every time we needed to add a new format to return values in (originally was XML) like JSON, there always seems to be a perl module "for that".
The best part of things is the fact that while we've added new functionality, we haven't had to do any maintenance work on the script in almost 5 years now.
Biggest change we made from 5.8.x to 5.10 was rewrite some nasty els if statements and made them switch statements.
The original web based management tool was originally written in PHP and that is what took all the time to maintain. It seemed like with each dot release of PHP some little thing broke and we were always fixing something every few weeks because of it.
"The problem with socialism is eventually you run out of other people's money" - Thatcher.
A more readable changelog, with formatting, hyperlinks etc applied (rather than a raw pod file) can be seen here
I think the camel's head didn't fit. The pic probably needs resized. As for the camel, it's featured on "Programming Perl", which has been the main way to learn Perl for most programmers. BTW, "Programming Perl" is being updated for a maybe-December release. I was notified by O'Reilly after reviewing "Programming Perl" and saying it was old and out of date.
The new search engine blekko is written in perl - wrote our own NoSQL database in it, too. We found CPAN to be an awesome resource; we use 600 distros from CPAN, and only found a couple of bugs in them.
It's Java that's the new COBOL. (buh dum, ching!)
Python 3 is barely different from Python 2
It's different enough to break the language for legacy code.
When you have code by the million lines, it's impossible to have a script that can reliably convert programs like Guido thinks it can. It's not just adding parentheses to print, there are some beastly things, like giving the division operator a different behavior. In Python 2.7, the result of (3 / 2) is 1, in Python 3 it's 1.5. I have absolutely no way to pore through those million lines and checking every division to see which operator should I use, keep the '/' or change it to '//'.
Besides, the changes from Python 2 to 3 are *all* in the direction of making it a more verbose language. I couldn't find any example of code that would be shorter in Python 3 than in 2. That goes against the philosophy of a scripting language, the last thing we need is a new Java.
I had gradually changed from Perl to Python over the years, but this P3k made me reconsider if this was wise. Apparently, there's no good-for-everything language left. So, in the scripting side, where quick results count, I've been considering switching back to Perl. Conciseness is king here, and nothing beats Perl at that.
As for large projects, thank god C is still there, still running K&R style code almost unchanged. Looking back over the years, I find that, for big projects, no language has given me less trouble than C. Once you get it running, it runs forever.
"I was just going to say that back in about 2001 someone gave me advice not to learn Perl 5 because a Perl 6 release was imminent."
It's a shame that this 'Osborne effect' has hung over Perl for the last decade. I wonder how Perl 5 would now be perceived if Perl 6 had been given a different name and announced as a research project into language development, rather than the next version of Perl? With better PR, Perl 5.10 could easily have been 'Perl 6'.
All this tends to obscure the quet evolution of Perl 5 programming into what 'chromatic' and others are calling 'Modern Perl', using an idiomatic style that takes full advantage of recent language features (some borrowed from Perl 6) and CPAN to write efficient and maintainable code:
http://www.modernperlbooks.com/
http://onyxneon.com/books/modern_perl/
As always, a lot of the most active development is happening outside the core language. Anyone interested in some of the directions Perl 5 is going in today ought to check out projects like these:
http://www.iinteractive.com/moose/
http://plackperl.org/
http://www.catalystframework.org/
http://mojolicio.us/
php5 is simpler? What planet do you live on?
In Perl:
curl -sL 'http://slashdot.org/index.rss' |perl -ne 'm/<title>(.+?)</ && print "- $1\n";'
Same thing in PHP5:
curl -sL 'http://slashdot.org/index.rss' |php5 -r '$h = fopen("php://stdin","r"); while(! feof($h)){$line=fgets($h); if(preg_match("/<title>(.+?)</",$line,$match)){echo "- ".$match[1]."\n";}}'
... and if you say "well, php5 is simpler for what *I* need," I'mma gonna poke you for thinking that everyone else has the same needs as you.