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.14 Released

timothy posted more than 3 years ago | from the before-swine-and-with-the-rest dept.

Perl 187

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."

cancel ×

187 comments

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

What about Perl 6? (0, Interesting)

Anonymous Coward | more than 3 years ago | (#36130016)

Wasn't Perl 6 supposed to be available about, oh, 11 years ago?

Re:What about Perl 6? (4, Funny)

nysus (162232) | more than 3 years ago | (#36130042)

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.

Re:What about Perl 6? (1)

larry bagina (561269) | more than 3 years ago | (#36130242)

He was right, but for the wrong reason :)

Re:What about Perl 6? (1, Insightful)

Anonymous Coward | more than 3 years ago | (#36130278)

Perl Nukem Forever?

Re:What about Perl 6? (0)

Anonymous Coward | more than 3 years ago | (#36130548)

Perl 6 will be the primary scripting language of the GNU Hurd if Larry Wall will fix his license.

Re:What about Perl 6? (4, Informative)

goombah99 (560566) | more than 3 years ago | (#36130056)

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.

Re:What about Perl 6? (2, Informative)

Anonymous Coward | more than 3 years ago | (#36130090)

No, Perl 6 is not "out". I can't use it on my production servers, because there's no good implementation yet, even after ten years.

I know there have been a few attempts, but none of them are seriously usable like Perl 5, Python, Ruby, Tcl, or Lua are.

At least when developing Python 3, the Pythonistas built a production-grade implementation. Even if its adoption hasn't been as fast as was initially hoped, at least those of us who do want to use it can actually use it, and we can do so for serious uses. The same can't be said about Perl 6.

Re:What about Perl 6? (3, Insightful)

symbolset (646467) | more than 3 years ago | (#36130206)

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.

Re:What about Perl 6? (1)

Anonymous Coward | more than 3 years ago | (#36130298)

That's true. However, it has also been over TEN YEARS since it was first announced, yet there's still no good Perl 6 implementation.

It's pointless to worry about retaining compatibility when nobody is actually able to use your software in the first place, even a decade after it was announced.

Re:What about Perl 6? (2)

arth1 (260657) | more than 3 years ago | (#36130406)

With Duke Nukem Forever being released next month, I think we shouldn't lose faith in Perl 6 either.

It's taken 10 years, yes, but sooner or later they'll realize that what people are waiting for is a _native_ perl 6, not one on top of parrot, haskell, perl 5 or any other external engine. Cause if you virtualize, you might as well use the underlying langauge - it has to be at least as powerful as perl 6.

Re:What about Perl 6? (1)

Anonymous Coward | more than 3 years ago | (#36130906)

Maybe, just maybe, the more mature a programming language is, the less need there is to extend it. Particularly in the case of scripting languages. Write new programs and APIs with new features, not languages with more syntactic sugar. Boy am I glad to be free of the cult of that wierdo Larry Wall.

Re:What about Perl 6? (0)

Anonymous Coward | more than 3 years ago | (#36130102)

that is to say it's surprisingly concise for encompassing such a lot of capabilities in the core language.

And it's the reason why it makes my anus hurt when I have to read it.

Re:What about Perl 6? (0, Insightful)

Anonymous Coward | more than 3 years ago | (#36130774)

And it's the reason why it makes my anus hurt when I have to read it.

The reading glasses that the doctor gave you are meant for external use, resting on the bridge of your nose - not for internal use. Stop using them as a suppository, and your anus should stop hurting within a few days.

Re:What about Perl 6? (4, Informative)

Tacvek (948259) | more than 3 years ago | (#36130140)

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.

Re:What about Perl 6? (1)

Anonymous Coward | more than 3 years ago | (#36130166)

Perl 6 is so damn complex that nobody can actually implement it.

but the power (3, Insightful)

Anonymous Coward | more than 3 years ago | (#36130514)

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.

Re:but the power (1, Funny)

Galactic Dominator (944134) | more than 3 years ago | (#36131144)

Nobody's mind is in a good shape after coding in Perl. Even reading it can cause mild permanent brain damage. Someone who writes a reasonably complex app in Perl has a very good chance of developing an uncontrollable homicidal rage and other social problems. For example, I hear the Unibomber, Timothy McVeigh, Dieter Simader, and bin Laden are all accomplished Perl grey beards.

Re:but the power (4, Insightful)

kiddygrinder (605598) | more than 3 years ago | (#36131348)

unless your problem is "what the hell does this code do that i wrote 6 months ago".

Re:but the power (0)

poopdeville (841677) | more than 3 years ago | (#36131732)

You should learn how to use "abstract interpretation". "6 months ago" is a terrible excuse not to use a language. If you can express a complex idea quickly, by using "weird" operators, interpreting the idea is easy, specifically by ignoring the "weird" operators and focusing on the types/semantics of the things they combine. There are only so many sensible ways to combine values, so there are exactly that many possible semantics for the combinators that combine them.

"6 months ago" is the best reason to use a strongly typed programming language, so that you can be absolutely sure that abstract interpretation will work on parametric operators.

Perl5 is a lovely, expressive language, with a variety of strong abstraction operators. Perl6 brings all of Perl5 in, and extends the language with a built-in object system (using what experience with Perl5 hacking has shown to be the most useful)

Re:What about Perl 6? (2, Interesting)

bill_mcgonigle (4333) | more than 3 years ago | (#36131276)

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.

I like this about English too. Can't tell that Larry is a linguist by training, can you?

Come to think of it, I bet Python developers tend to be fond of Esperanto too. Some similarities there.

Re:What about Perl 6? (4, Insightful)

bunratty (545641) | more than 3 years ago | (#36130266)

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.

Re:What about Perl 6? (1)

goombah99 (560566) | more than 3 years ago | (#36130816)

have you ever seen a program that did not have a "print" statement in it? well those don't exist. And ignoring that whopper, I can tell you that it's not the big ones that really screw up legacy programs, it is the tiny tweaks that only go wrong one in a million times. Perl5.6 to 5.8 had some really really subtle changes to regrular expressions that broke programs in almost impossible to detect ways. Python 3 is death for legacy python.

Re:What about Perl 6? (0)

Anonymous Coward | more than 3 years ago | (#36131342)

And have you actually seen the changes made between Python 2 and 3? As far as I know, the syntax is completely unchanged. There were a lot of changes in the library though, restructuring stuff and removing legacy code. Porting all my code (that doesn't depend on external libraries which require Python 2) still barely took any effort at all.

In my opinion, GP is correct. The mandatory () for print is one of the largest troubles I've been having. Another big one has been that xrange has been renamed to range, which forced me to replace all occuraces (which I did with a script, of course). If I recall correctly (I ported to py3k a long time ago), the program 2to3 takes care of those things for you. It also eliminates a lot of the search-and-replace.

Re:What about Perl 6? (2)

kiddygrinder (605598) | more than 3 years ago | (#36131372)

erm... i'm pretty sure there are a lot of gui programs that don't use print. ignoring that i think fixing brackets on print is pretty fucking trivial. do you have any better examples?

Python 3 is death to Python (4, Informative)

mangu (126918) | more than 3 years ago | (#36131958)

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.

Re:What about Perl 6? (1)

Anonymous Coward | more than 3 years ago | (#36131254)

IMNSHO I tend to think that like Python 3, Perl 6 is a broken version of a once useful language. I'll stick with Python 2.x and Perl 5.x.y.

Meh. (-1, Troll)

Anonymous Coward | more than 3 years ago | (#36130024)

Perl is a language that encourages unmaintainable spaghetti code. It's "job security" for fat, Cheeto's eating social rejects.

Re:Meh. (2, Funny)

Anonymous Coward | more than 3 years ago | (#36130068)

Where do I sign up?

Re:Meh. (-1)

Anonymous Coward | more than 3 years ago | (#36130204)

Thats why Slashdot is written in it, so the programmers of slashcode can feel "superior" when breaking the comments system for most browsers and only works properly on an obscure version of Firefox in an obscure Linux distro that doesn't compile on modern hardware.

Meanwhile Frito-Lays announces record profits due to excessive Cheetos sales due to record amounts of nerds in their basement spending their welfare checks on hundreds of packets of them a month while their "real" job is being done by slim Indians using proper Microsoft Certified development tools.

Re:Meh. (1)

Runaway1956 (1322357) | more than 3 years ago | (#36130788)

Indians using proper Microsoft Certified development tools.

Did you write that with a straight face? Enjoy spending Microsoft's money, you pathetic shill!

The question nobody wants to ask.... (3, Funny)

cowboy76Spain (815442) | more than 3 years ago | (#36130064)

.... 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.

Re:The question nobody wants to ask.... (3, Interesting)

gman003 (1693318) | more than 3 years ago | (#36130142)

Actually, I've always thought there should be one more common operator - "===". In floating-point context, it would be "approximately equal to", returning true if the arguments are within 10 times the smallest representable value. That would reduce problems with floating-point comparison. Hell, make it work for integers too - it might be useful in PLCs and stuff.

In a string context (in Perl, it would have to be something besides ===, but we'll get to that later), it would be "visually equal to" - any characters that are visually equal would be considered equal (useful mainly when using Unicode). So the Cyrillic "e" (0435) would be considered equal to Roman "e" (0065). I'm not sure how to handle complexities like "is the single character 'small a with macron' equal to the sequence 'small a' and 'combining diacritic macron'". We'll need a committee for that, probably. And since Perl uses different operators to determine context, we'd need something else for that. "veq", maybe?

This would, ideally, not just be a Perl construct. I can think of a lot of higher-level languages that could use that. Python. Ruby. Lua. Stuff like that. Lower-level languages probably would be better off without it - C does not need such an operator.

Just something I've always felt could be useful to have. Sure, there's probably some library that can do those things, but it would be nice to make things simpler.

Re:The question nobody wants to ask.... (0)

Anonymous Coward | more than 3 years ago | (#36130168)

Ruby already has an === operator. Override it to evaluate whatever weird definition of 'equality' floats your boat. http://www.ruby-doc.org/core/classes/Object.html#M001008

Re:The question nobody wants to ask.... (1)

gman003 (1693318) | more than 3 years ago | (#36130268)

Huh. Cool. I never played with Ruby much, never saw that.

Re:The question nobody wants to ask.... (2)

elfprince13 (1521333) | more than 3 years ago | (#36130300)

This would conflict with "equality without type coercion" in Javascript and PHP.

Re:The question nobody wants to ask.... (2)

Eil (82413) | more than 3 years ago | (#36130768)

Er, no it wouldn't because Perl is neither Javascript or Python.

Re:The question nobody wants to ask.... (0)

Anonymous Coward | more than 3 years ago | (#36130938)

"This would, ideally, not just be a Perl construct. I can think of a lot of higher-level languages that could use that. Python. Ruby. Lua. Stuff like that. Lower-level languages probably would be better off without it - C does not need such an operator."

Re:The question nobody wants to ask.... (2)

kiddygrinder (605598) | more than 3 years ago | (#36131378)

true, but fucking around with that kind of thing between languages is really annoying when you work in both regularly

Re:The question nobody wants to ask.... (0)

emarkp (67813) | more than 3 years ago | (#36130636)

Actually, I've always thought there should be one more common operator - "===". In floating-point context, it would be "approximately equal to", returning true if the arguments are within 10 times the smallest representable value. That would reduce problems with floating-point comparison.

Thus exposing your ignorance of how to use floating point numbers. Thank you for handing me a new question for my interview list to highlight weaknesses of potential candidates. The "problems" with floating point are well-known, and if you use them correctly they do a fine job. If you're so ignorant that you blindly do a simple comparison test like this, it means you probably shouldn't be writing software that uses floating point.

Hardcoding an operator to perform this specific test (which is one particular way to compare for equivalency) is idiotic, and would encourage even more "programming by guessing" than we already have.

Re:The question nobody wants to ask.... (0)

gman003 (1693318) | more than 3 years ago | (#36130672)

No, I'm well aware of the problems with floating-point math. Hence why I have code that does "if (x - y
And I also know NEVER to use floats for currency. That's just asking for trouble.

But hey, thanks for flaming. If I'm not pissing someone off, I'm obviously doing something wrong.

Re:The question nobody wants to ask.... (3, Insightful)

petermgreen (876956) | more than 3 years ago | (#36130818)

The big problem with an approximately equals for floats operator is that it provides no way for the user to specify the acceptable margin of error. So the language designer has to guess a value that they thing is "big enough" to avoid (possibly heavily compounded) rounding errors while not being so big as to cause unwanted matches. IMO that kind of judgement call should be something consciously made by the programmer (and they should be having the releated thought of "should I really be using a floating point type here at all" not something hardcoded into the language.

Similarly for strings "approximately equals" sounds like a nice idea but it's very hard to define in a robust way. Again probablly not something that should be in the core of a langauge but something provided by a library that can give options on what exactly constitutes approximately equals.

Finally using === to signify approximately equals seems like a bad idea given that many dynamic languages are using it for something closer to "exactly equals".

Re:The question nobody wants to ask.... (1, Interesting)

Nutria (679911) | more than 3 years ago | (#36130688)

it means you probably shouldn't be writing software that uses floating point.

Since I'm not a scientist or graphics programmer Floats are as damned useless and destructive as needing pointers to do string manipulations in C.

BCD should be the default data type for decimal arithmetic.

Re:The question nobody wants to ask.... (1)

Hognoxious (631665) | more than 3 years ago | (#36131938)

Thus exposing your ignorance of how to use floating point numbers.

Ignorance would be simply testing for equality and wondering why your code sometimes doesn't work. Clearly he's aware of the issue, or he wouldn't have raised it.

Hardcoding an operator to perform this specific test (which is one particular way to compare for equivalency) is idiotic, and would encourage even more "programming by guessing" than we already have.

I don't like his idea of having a fixed limit, but why couldn't it be done with a ternary operator?

Re:The question nobody wants to ask.... (1)

goombah99 (560566) | more than 3 years ago | (#36130836)

bite_me() if abs($x-$y)> $epsilon;

$t =~ tr/e/e/;
eat_me_raw() if $t eq $s;

Re:The question nobody wants to ask.... (3, Interesting)

VortexCortex (1117377) | more than 3 years ago | (#36130856)

I somewhat agree, however the floating point implementations SUCK at powers of ten -- you should specify epsilon in terms of powers of two. Hell, even my correct decimal text to float/double parsing function is 8 times more complex than the same in hex Why, even C has a hex float/double literal that goes something like this:
/[+-]?0x[0-9a-f]+\.?[0-9a-f]*p?[+-]?[0-9a-f]*/i )

The "p" in there stands for "times Nth power of two" similar to the "e" in decimal floats meaning "times Nth power of ten". eg: 0x123p-8 == 0x1.23

Note, hex decimal places act like decimal's do eg:
0x1.23 == (dec) 1 + 35 / 256 == 1.13671875 or (hex) 0x1 + 0x23 / 0x100 == 0x1.23

Specifying floats in the language of the computer's math (binary representable fractions) allows you to actually use equality properly ;-)

Some of my languages have the === operator already, similar to JS's exact match, perhaps ~=~ or =~= or "approx" would be better?
I've thought of adding an "approximate" operator -- esp. for physics simulation & game DSLs.

Although, what's wrong with specifying your required precision? Define your own epsilon (error factor).

print "$a is approx $b\n" if ( $a > ($b - $epsilon) && $a < ($b + $epsilon) );

# Compared to:
print "$a is approx $b\n" if ( $a approx $b );

# Oh, great, now we need another obscure magic special variable to contain epsilon...
# Perhaps
would do? Our English users won't mind using character map...

Re:The question nobody wants to ask.... (0)

Anonymous Coward | more than 3 years ago | (#36130214)

Not yet, but the changelog contains this:

C<?PATTERN?> (without the initial C<m>) has been deprecated and now produces a warning. This is to allow future use of C<?> in new operators. The match-once functionality is still available as C<m?PATTERN?>.

So stay tuned.

Re:The question nobody wants to ask.... (2)

dorward (129628) | more than 3 years ago | (#36130234)

This is version 14 of Perl 5. It is a major release. (Perl 6 is [rakudo.org] a new language)

Re:The question nobody wants to ask.... (1)

formfeed (703859) | more than 3 years ago | (#36130316)

.... does it have any new operator? :-P

Of course. Not every possible key combination has been used yet.

With previous versions of perl, a cat could walk over the keyboard and accidentally create valid perl code.
Now a cat walking over the keyboard will for sure create valid perl code.

Re:The question nobody wants to ask.... (3, Informative)

gman003 (1693318) | more than 3 years ago | (#36130576)

That reminded me of "Black Perl":

BEFOREHAND: close door, each window & exit; wait until time.

open spellbook, study, read (scan, select, tell us);

write it, print the hex while each watches,

reverse its length, write again;

kill spiders, pop them, chop, split, kill them.

unlink arms, shift, wait & listen (listening, wait),

sort the flock (then, warn the "goats" & kill the "sheep");

kill them, dump qualms, shift moralities,

values aside, each one;

die sheep! die to reverse the system

you accept (reject, respect);

next step,

kill the next sacrifice, each sacrifice,

wait, redo ritual until "all the spirits are pleased";

do it ("as they say").

do it(*everyone***must***participate***in***forbidden**s*e*x*).

return last victim; package body;

exit crypt (time, times & "half a time") & close it,

select (quickly) & warn your next victim;

AFTERWORDS: tell nobody.

wait, wait until time;

wait until next year, next decade;

sleep, sleep, die yourself,

die at last

That's actually valid Perl (only Perl 3, though - it breaks in later versions). And yes, I'm aware most of you have already seen it.

Perl - the COBOL of scripting languages (0, Troll)

rubycodez (864176) | more than 3 years ago | (#36130108)

Back in its day, Perl was vastly superior to its alternatives for web server language or large/large shell script jobs. So many superior (e.g. python) or just simpler (e.g. php5) alternatives have arisen while Larry vainly struggles on trying to turn Perl 6 into a swiss army knife complete with toilet, bowling ball and strap-less bra. Thus is the language is dying off, I see few projects done in Perl at my clients (which have tens of millions to billion+ dollar IT budgets). Sure, it's part of the important legacy code in various configuration and building tools for various OS that I use, but I could say the same for the remaining COBOL that lingers at my clients. It's undead but hardly living.

Re:Perl - the COBOL of scripting languages (1)

Anonymous Coward | more than 3 years ago | (#36130144)

I still see perl getting used a lot - esp. in the financial services industry.

Re:Perl - the COBOL of scripting languages (1)

rubycodez (864176) | more than 3 years ago | (#36130212)

I don't, there is huge financial services industry in Chicago area, hot languages are dot-NET family, j2ee, objective C, c/c++, php5 , but haven't seen Perl for ages.

Re:Perl - the COBOL of scripting languages (1)

Anonymous Coward | more than 3 years ago | (#36130146)

I think the problem is that Larry didn't know what he wanted Perl to be, so he tried to make it everything. But now we have C#/Java for strong type enforcement (for large projects with inexperienced people), Haskell and friends for academics and functional purists, python/javascript/lua/etc. for scripting...Perl just doesn't have a niche anymore.

Re:Perl - the COBOL of scripting languages (5, Insightful)

gman003 (1693318) | more than 3 years ago | (#36130220)

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.

Re:Perl - the COBOL of scripting languages (2)

rubycodez (864176) | more than 3 years ago | (#36130346)

I love OpenBSD. But aside from scripts for mucking with perl itself, the reason perl is in the base install is to run the following (mostly brain dead simple) things:

in /usr/sbin:
add_user and rm_user scripts
apxs (apache extension DSO builder / installer)
pkg_chk, pkg_delete, pkg_info, pkg_create, pkg_merge (our simple and crude package manager)


in /usr/bin:
afmtodit font file creator for groff
c2ph/pstruct dump c structure with offsets from debugger stabs
find2perl convert find command with args to perl program
piconv character encoding converter
sed2p sed to perl converter


Nothing that couldn't be done better as a side effect to a rewrite to more modern and alive language, the apxs, package manager and add/delete user is probably the only things most people use beside some that might use the apache extension handler. That package manager is especially aching for better features anyway.

Re:Perl - the COBOL of scripting languages (1)

gman003 (1693318) | more than 3 years ago | (#36130498)

Are you sure all that's in the base install? I can't see why apxs is there, since (last I checked) Apache isn't in the default install. And I think c2ph is only in the compiler "package", which is technically optional.

Although I do agree that most of that could be rewritten in sh or even in C, rather easily. And the package manager does suck.

Re:Perl - the COBOL of scripting languages (1)

rubycodez (864176) | more than 3 years ago | (#36130582)

forgot in /usr/libexec has vi.recover and makewhatis in perl

had to check, but the c2ph/pstruct is in the base49.tgz

heavily audited chrooted 1.3 apache is in the default install,

,
It's sour grapes, I used Perl in development as was and fanboy over a decade ago. Major disappointment for me the way things went.

Re:Perl - the COBOL of scripting languages (1)

MightyMartian (840721) | more than 3 years ago | (#36130228)

Neither should Cobol, and yet, as with Perl, sometimes there is a thing called historical momentum. Perl is still used in a lot of places, and there is a helluva lot of Perl code out there.

Re:Perl - the COBOL of scripting languages (2)

rubycodez (864176) | more than 3 years ago | (#36130372)

but, as with COBOL, that momentum is running down while with other scripting languages things are heating up. I like a language where the attention of the found and key developers are focusing on what will be used in the near future, not flying off into lala land for a decade speaking to each other in isolation.

Re:Perl - the COBOL of scripting languages (0)

Anonymous Coward | more than 3 years ago | (#36130442)

Hackers, even if many moved to ruby with metaslpoit

Re:Perl - the COBOL of scripting languages (3, Interesting)

dskoll (99328) | more than 3 years ago | (#36130358)

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.

Re:Perl - the COBOL of scripting languages (2)

rubycodez (864176) | more than 3 years ago | (#36130624)

well, all the other languages jacked Perl's DBI (and many, many other things) for their libraries.

Your company has history with Perl, but I don't think it will be chosen for new things now, PHP alone is mostly eating its lunch. Web serving the stats are something like 75% PHP5.x and 20% dot-NET but only 1% Perl with J2EE 5% (some overlap as sites run multiple langauges, but still....). Compare that to over ten years ago (when I was developing in Perl), it's really fallen.

Re:Perl - the COBOL of scripting languages (3, Interesting)

ducomputergeek (595742) | more than 3 years ago | (#36131044)

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.

Re:Perl - the COBOL of scripting languages (4, Insightful)

jimmydigital (267697) | more than 3 years ago | (#36130394)

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.

Re:Perl - the COBOL of scripting languages (1)

rubycodez (864176) | more than 3 years ago | (#36130644)

Troll? You mention java, there are five times the web sites using server-side j2ee (bloated crap that sells hardware) compared to Perl. Sure, it's everywhere doing legacy crap like the (spartan) OpenBSD package management system I mentioned elsewhere in this thread , but essentially no one is choosing it for new projects, i anything BUT Perl is the norm. Face it man, it's a 90s language and it is dying. Netcraft and other web stat sites help confirm it. And Larry is killing it.

Re:Perl - the COBOL of scripting languages (5, Insightful)

jimmydigital (267697) | more than 3 years ago | (#36130684)

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.

Re:Perl - the COBOL of scripting languages (-1, Troll)

rubycodez (864176) | more than 3 years ago | (#36130720)

no, that would be C, which also holds your Perl together. I can run and admin a server without perl installed, but not without C

Re:Perl - the COBOL of scripting languages (1)

jimmydigital (267697) | more than 3 years ago | (#36130792)

no, that would be C, which also holds your Perl together. I can run and admin a server without perl installed, but not without C

I guess you missed the part about 'in a minimum of time'.

Re:Perl - the COBOL of scripting languages (2)

iggymanz (596061) | more than 3 years ago | (#36130872)

that "minimum of time" is only until the next poor SOB has to modify some code. Then it's time to go a-wadin' through the whale guts.....

Re:Perl - the COBOL of scripting languages (1)

Greg Lindahl (37568) | more than 3 years ago | (#36131550)

New startups using perl, courtesy of Quora:

blekko
nabbr
selectablemedia.com
goba.mobi
socialflow.com
duckduckgo

Big companies writing lots of new perl, also courtesy of Quora:

Lokku (makers of Nestoria), BBC, LJ, IMDB, Salon.com, Typepad, Zappos, Craigslist, FriendFinder, Ticketmaster, Slashdot

I think you're really confused about the role Larry plays in the community. He's slowly creating a new language, which has little to do with perl 5. Perl 5 is actively maintained and has a large community of users.

Re:Perl - the COBOL of scripting languages (1)

Eil (82413) | more than 3 years ago | (#36130870)

Php is somewhat painful to code in by comparison but both have their place.

I respect your opinion, but my experience has been different. I forced myself to learn Perl twice and never could quite get the hang of it. So much of the language is context sensitive (e.g., this arbitrary symbol means a certain thing, except in some cases where it means something completely different) and there are so many features that I always felt overwhelmed. Sure, I always managed to get the code working but it felt hackish and thanks to "there's more than one way to do it," I was never sure if the way I implemented was the right way.

PHP is far simpler. It's the only language that I've learned solely by reading code. Yeah, PHP has its warts (I'm looking at you, zillions of global functions) but I never find myself staring at a line of PHP wondering what it's doing.

I don't agree with you about Java either, but that's a rant for another day.

Re:Perl - the COBOL of scripting languages (1)

chromatic (9471) | more than 3 years ago | (#36131316)

I was never sure if the way I implemented was the right way.

The free book Modern Perl [onyxneon.com] explains how to use Perl 5 in an effective and maintainable fashion.

Re:Perl - the COBOL of scripting languages (0)

Anonymous Coward | more than 3 years ago | (#36131230)

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.

That's pretty much an argument for the GP's point that Perl is the COBOL of scripting languages. Despite looking, feeling, and just generally being an ancient programming language, Perl is so entrenched in the computing world that it remains a cornerstone after all these years. Don't know what scripting languages a host has available? Well if it has anything, it has Perl. And why would it have Perl? Well somewhere there's bound to be a Perl script to manage some important process. So if you wanted to write a brand new script, why would you want to write it in Perl? Because the next host you install it on will have Perl, but it might not have Python, PHP, or whatever else.

Keep in mind that your post refuting the analogy didn't make an argument that Perl is a good language, just that it is still used and doing real work. You know, like COBOL.

Java has its uses (1)

Billly Gates (198444) | more than 3 years ago | (#36131266)

I decided to specialize in Java at college. Today, my business I want to start will be php based because I am 5x as productive with it, but Java is great for large scale programs.

With Spring, Hibernate, and MVC you can make great million line code web sites that are more like applications than simple scripts frankensteined together ala PHP. This is great for advanced database access and business logic and intelligence. For 90% of sites out there ... tiny ... Java is overkill. However with Java I can develop the app, extend it, modify it, and change it little over a decade compared to PHP and can make it scale from a shared single server all the way to an IBM mainframe.

I do admit I will only switch to Java after I have the revenue to hire someone to do it full time so it is not perfect. But if I were to grow my idea into a billion dollar company it would seem Java would fit my bill quite well. I know 10 years from now I can deploy the code and it will run securely with minimal issues.

Re:Java has its uses (1)

Greg Lindahl (37568) | more than 3 years ago | (#36131700)

Perl has some nifty frameworks that can make you as productive as PHP for small web projects, and it also does large projects well.

But hey, if you're comfortable with PHP and Java, and want to pay to have your app completely rewritten, then more power to you.

Re:Perl - the COBOL of scripting languages (0, Informative)

Anonymous Coward | more than 3 years ago | (#36130452)

Can't argue webservers/sites, but the command line?

Please. Python? Really? Really? Useful for some things, perhaps, but talk about overblown. And yeah, sorry, PHP is crap on the command line. (I'd say it's crap on the webserver as well, but that has less to do with the inherent flaws of PHP and more to do with, "LOL I R ROCKSTAR" PHP monkeys. :p)

There are actually worthy competitors to Perl, mind you, but Perl still wins by virtue of being included on systems by default. Rare is the case where you have to actually manually install Perl. Think the only time I've ever had to do that, actually, was with Windows systems. ;)

Re:Perl - the COBOL of scripting languages (2)

rubycodez (864176) | more than 3 years ago | (#36130702)

In default installs, Python is eating Perl's lunch on the command line, I can confirm by greping through my distro's /usr/bin and /usr/sbin. More python scripts to admin the system than Perl! That argument (in the default install) doesn't hold as much weight anymore, Python is also default in most major linux distros (and the new admin stuff is using that, while the crufty Perl admin scripts linger because no one cares to rewrite them).

Re:Perl - the COBOL of scripting languages (1)

kiddygrinder (605598) | more than 3 years ago | (#36131432)

oh noes python is overblown! does that even mean anything? take your trolling elsewhere.

Re:Perl - the COBOL of scripting languages (1)

plopez (54068) | more than 3 years ago | (#36130800)

COBOL is still alive and kicking. It still does some things better than any other language. As Scotty once said "Use the right tool for the job, laddie"!

Besides, COBOLScript is the COBOL of scripting languages:

http://www.computer.org/portal/web/csdl/doi/10.1109/EDOC.2000.882363 [computer.org]

You should really do a bit more language evaluation. I don't know if you are ready to leave your parents' basement yet.

Re:Perl - the COBOL of scripting languages (1)

bill_mcgonigle (4333) | more than 3 years ago | (#36131374)

So many superior (e.g. python) ...if memory efficiency isn't on your requirements list...

or just simpler (e.g. php5) ... if you can remember to use different string function calls depending on the encoding of your variable (you always know this ahead of time, right?)...

while Larry vainly struggles on trying to turn Perl 6 into a swiss army knife

Larry's not involved in the most likely successful implementation effort (Rakudo). Heck, I'm not even sure there have been any language specification updates of note in the last five years.

Re:Perl - the COBOL of scripting languages (3, Interesting)

Greg Lindahl (37568) | more than 3 years ago | (#36131484)

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!)

Everyone is crazy.. (0)

Anonymous Coward | more than 3 years ago | (#36130230)

Stop complaining. Perl is still the shit.

Perl is alive! (2)

fragermk (96318) | more than 3 years ago | (#36130322)

Perl is alive!

Last time I checked Slashdot still runs on perl...

My company does too.

Now that ActiveState is providing Perl for Cloudfoundry, it's going to be good times in Perl land.

Re:Perl is alive! (2, Insightful)

rubycodez (864176) | more than 3 years ago | (#36130734)

last time I checked the UI of Slashdot was becoming ever more bloated, ugly and less functional. They should ditch the Perl for a modern language while rewriting the whole ball of shit.

Re:Perl is alive! (1)

PhrstBrn (751463) | more than 3 years ago | (#36131110)

What does UI have have to do with the backend implementation? The UI goes in a bunch of template files, which could theoretically be language agnostic.

Any task (with regards to web apps) a modern language can do, Perl can do (and visa versa). One may be easier than the other for certain things, but Perl isn't a choice. Maybe not the best choice, but certainly far from unusable.

For me Perl is alive and well. (4, Informative)

EEPS (829675) | more than 3 years ago | (#36130462)

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?

Re:For me Perl is alive and well. (4, Interesting)

aixylinux (1287566) | more than 3 years ago | (#36130694)

I agree completely. As a UNIX sysadmin I frequently write scripts. For short and simple things, shell is preferred. But if I anticipate any complexity, I reach for Perl. I've had the experience of getting deeply into a shell script and thinking "I should have used Perl". Perl has never let me down, although I confess at times the programs have that write-only, line-noise appearance. But that's just because I've learned to use the idioms, and I comment on the complex stuff for the benefit of those who follow me--which could include myself six months later.

I'd write Ruby if I could. The syntax is cleaner, and objects are built-in, not bolted on. But Ruby is just not available where I need it. Does anybody know of an AIX LPP package for Ruby?

Also, I've been deeply disappointed at the progress of Perl 6--but Perl 5 does everything I need, so I really don't miss it. Of all sad words of tongue or pen, the saddest are these--it might have been.

Re:For me Perl is alive and well. (1)

PhrstBrn (751463) | more than 3 years ago | (#36131146)

I agree. I can always find Perl installed (most of the *nixes come with this by default due to dependencies), but python is less frequently installed, and ruby is almost never installed. Perl works fine for those hack-type scripts, so I don't see a pressing need to go start installing ruby or python everywhere. If ease of use is the deciding factor for choosing the language, then Perl is certainly the easiest to deploy of the full fledged scripting languages.

headless camel (0)

Anonymous Coward | more than 3 years ago | (#36130558)

can anyone explain the picture of a headless camel next to the article summary? Is this Perl's mascot? Does a camel with its head cut off act similarly to a chicken with its head cut off?

Re:headless camel (3, Informative)

danbuter (2019760) | more than 3 years ago | (#36131236)

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.

Port already in MidnightBSD (0)

Anonymous Coward | more than 3 years ago | (#36130592)

Perl 5.14 is already available in the MidnightBSD mports. Try it out folks.

bash not perl (1)

highacnumber (988934) | more than 3 years ago | (#36130606)

I don't like Perl so I wish the catchy put-down of the summary title was accurate, but its not quite right. I think shell scripts are the COBOL of scripting. Perl might be more like B, although I'm not sure there is a great analogy there.

Perl 5-something? (0)

Kaz Kylheku (1484) | more than 3 years ago | (#36130622)

Did I time warp to the 90's?

Re:Perl 5-something? (1)

rubycodez (864176) | more than 3 years ago | (#36130746)

I had the same thought when someone mentioned Perl 6 would be out soon

Re:Perl 5-something? (1)

tempire (1965646) | more than 3 years ago | (#36131630)

This is a clear example of folks not really knowing what they're talking about.
Perl6 is a language spec, not a language implementation. Check out Rakudo if you want to see an implementation.

Even so, Rakudo (and any other Perl6 implementation) is *not* the successor to Perl5. It's an unfortunate naming scheme that people don't understand, and although there are similar and borrowed elements between the two, they do not directly relate to each other.

If you want to see activity, check out web frameworks like Mojolicious (http://mojolicio.us), or installation tools like Perlbrew (http://perlbrew.pl). There's also plenty of activity going on @ sites like: http://blogs.perl.org/ [perl.org] , http://ironman.enlightenedperl.org/ [enlightenedperl.org] , http://perlbuzz.com/ [perlbuzz.com] .

Not to mention plenty of jobs always coming across the wire @ http://jobs.perl.org/ [perl.org] . Which, interestingly enough, some rubyists copied - http://jobs.rubynow.com/ [rubynow.com]

I see dead languages (1)

iggymanz (596061) | more than 3 years ago | (#36130796)

I see dead languages, languishing in the default installs of OS mostly as wrappers for menial tasks, taking command line arguments and making output in some cron and admin jobs, and they don't even know that they're dead! 8o

A more readable changelog (4, Informative)

shutdown -p now (807394) | more than 3 years ago | (#36131070)

A more readable changelog, with formatting, hyperlinks etc applied (rather than a raw pod file) can be seen here [cpan.org]

It Lives! (2)

Tumbleweed (3706) | more than 3 years ago | (#36131370)

Internet Yiddish LIVES!

Age Demographic (1)

Anonymous Coward | more than 3 years ago | (#36131896)

Just reading the comments for and against perl and wondering about the age of the posters. How many new perl programmers are there? How many people are switching? It just sounds like some comments are from people with 10+ years of IT experience and bit stuck in their ways (just like I am with python!).

Is this perl's destiny http://news.bbc.co.uk/2/hi/also_in_the_news/7097647.stm

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?
or Connect with...

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>