Anyone here still use perl?

Anyone here still use perl?
>great syntax

Has python replaced perl?

Other urls found in this thread:

swtch.com/~rsc/regexp/regexp1.html
perlmonks.org/?node_id=663393
metacpan.org/pod/distribution/perl/pod/perldelta.pod
youtube.com/watch?v=4rnJEdDNDsI
perl.org/books/library.html
fastcompany.com/3026698/inside-duckduckgo-googles-tiniest-fiercest-competitor
openbsdfoundation.org/contributors.html
twitter.com/NSFWRedditGif

I heard python was dying though
what's wrong with Perl that it can't be spruced up or fixed

lol no

I still use it a lot, instead of other scripting stuff.
Well /bin/sh is ok for small scripts, but I don't like to write more than a page or two of that.

Rex for system admin stuff
Mojolicious for web dev

swtch.com/~rsc/regexp/regexp1.html

Mostly, yes.


Not even Python2 will die in our lifetime, I'm afraid.

>swtch.com/~rsc/regexp/regexp1.html

I think he means perl/PCRE regexes are way more advanced than normal posix ones, not that theyre faster

That bungled migration from Python2=>Python3 pisses me off so much. They shouldn't compatibility if they can't deprecate the older version within a couple years.


Perl's entering similar bullshit by breaking compatibility between Perl5 and Perl6. So it is actually getting "spruced up", but for the next decade you're going to have to consider which modules you want to be able to use when you pick which version of perl you're targetting.

I think that Perl `died` as soon as Perl 6 development started. I don't really hear about people picking it up anymore.


Source? It seems to continuously be on the uptick.

Parsing perl syntax is literally computationally undecidable because its syntax is level 0 on the Chomsky hierarchy making the syntax itself turing complete.
perlmonks.org/?node_id=663393

For about 10 years now, yes. Its ogre for perl.

I was a Perl4.036 guy. Perl5 turned me off-- it was no longer the "shell level" utility I was using it for.

I once compiled the perl-embedded vim, just so I could use those superior regex. Too bad the regular vim uses some other shit. Anyway whatever, these days I normally just use vi (aka nvi).


I don't even use modules that much, except the ones included in the main Perl distribution. It's too easy to end up with a huge list of dependencies and I really hate that, especially after years of dealing with multiple OS that needed to run the same code (and having problems compiling various CPAN modules on some). Of course, sometimes you need DBI or something, but I think really hard about it before just pilling stuff on.
Never was into all those fancy OO frameworks like Moose or whatever either. Always just used simple blessed hashref, for the rare cases I needed OO at all.

Still my favorite language.
Don't care what underage hipster faggots say. It might not be the best for big projects but neither is python. Pick a different language if you do enterprise shit but for small things nothing beats perl.

Confirmed cuck language

I'm an old oldfag and I wrote a lot of perl in the '90s, even taught it to the techs at a couple biotech firms who used it for sequencing. Perl was like PHP in that it works but holy shit do you want to not be using it and when the opportunity presents itself you flee and never look back.
The worst part of perl is something that was widely understood to be the worst part back then that you might not understand at this point in your life, the "there's more than one way to do it" motto of perl. It was an incredibly odd and inconsistent language and a dozen programmers asked to solve a problem in perl would give you a dozen very different answers and each of them had trouble understanding the other answers. Now imagine trying to make a team out of them. It didn't work well. At all.
There were plenty of other issues related to scaling to large projects. ooperl was their solution and it was a nightmare of edge cases and fragile design. And portability and embedding were both pretty poor, especially on Windows, and a large project would eventually run into a need to run on it.
Python eventually became usable and there was what felt to me like an overnight switch. Redhat said they were going to do all their stuff in python and then everyone else said the same. Python isn't perfect by any means but thank god it killed perl. Don't dig up that grave.

So Mr Monstanto and Redhat comes in here and tells y'all how it is. Gonna take it?

Anyone who uses Perl for any length of time eventually learns to recognize the typical idiomatic patterns that the language allows.
Once I became proficient, I never had problems reading Perl code, unless it was deliberately obfuscated or some extreme golf related game. But even in those cases, some familiar patterns emerge once you play those games for a bit.
And just because there's 20 ways to do something doesn't mean that in practice 20 people will use a different one. But even if they do, and I learn a new trick or better way, then I'm cool with that, because it makes me for flexible and adaptable.

I'm lucky to work in a Perl shop. Lucky because, although Perl isn't my favorite language, holy crap does its close competition suck.

The downside, this is a sysadmin shop, so the code in general is not great. Some of it is really torturous to have to maintain. Would another language help? No, and especially not with the worst examples. But seeing such code, I can understand how Perl could 'die' to such lame competition: such code needs a complete rewrite; the guy who wrote it as a day-old Perl hack is now senior in the company; rewriting it into a 'better language' covers that guy and interim maintainers. You're not throwing away their work because they were bad, but because Perl was bad.

Although we're a Perl shop, you can use other languages, and Python also has a measure of popularity. And typically the first thing you have to do to get Python to work is to install a version of Python just for that script. python 2.6? no, you need 2.7. OTOH, at least that's faster than installing 100 CPAN modules.

Perl's problems are: 10-year-old versions in deployment, and deployed versions without threading. Even if you use cPanel's slightly more modern Perl, it doesn't have threads, "for speed". The result is that when you really do need threads for something, you write it in Python, even though Perl's so much better at exactly this. Perl's presence in the world is so embarrassing. And yeah, it probably has a lot to do with Perl6. You can even say that Perl6 killed Perl, if you understand that Perl did not die but rather lives on a zombie that never gets updated. The fruit of perl6: we use perl 5.8.8 forever.

And perl6 itself is like ten years from competing with perl5 on bare performance. By the time it gets around someone I'll probably be adminning linux systems with javascript oneliners.

5.8.8 is pretty old. They're up to 5.24 now. Here's most recent changelog:
metacpan.org/pod/distribution/perl/pod/perldelta.pod
Granted, you probably don't need to upgrade unless there's some bugfix that affects you, and that's pretty rare. But it's not fair to say nobody ever updates Perl 5 anymore.
In fact, someone told me they sometimes backport some new stuff from Perl 6. I haven't looked into that, so dunno, but it makes sense if the new features are useful.
I normally just use whatever OpenBSD ships with, and they tend to stay pretty current.

Yes, I know. If you install Perl yourself, you can use the latest thing. But systemperl has been frozen in time for a while.

I'm planning to become a sysadmin am I going to need to really dig in and learn perl? I'm going to learn python since it can be used with alot of things, ansible, aws, scripting etc. What do you guys think?

Learn Perl. It's not that hard if you already know Python. Just read through Learning Perl and Programming Perl, or run 'perldoc perl' and read all of that.

If you only know Python, then the job will force you to learn other languages anyway, because Python is worthless at the command line. There's a lot of ephemeral explorative command-line programming in system administration. Shit comes up, it's new - or new to you - and you need to figure out what the hell's going on. Once you've written something to help in one case, you'll want to save it just in case that comes up again. Eventually some of this stuff will make its way into proper scripts; some other stuff won't be that useful. But if your idea is to stop and write a proper script in a file every time you need to do something, you're just not going to do that. You'll demonstrate ever more elaborate uses of awk and sed and bash and you'll pretend you aren't programming.

Also, when you've got 10ks of hosts you might be logging into in a day, a oneliner is just inherently easier to deploy than a script. One might be pasted. The other might be added into an RPM after review.

Thanks user, I'll go through the perldoc perl to start.

You referring to stuff like AWS lambda?

I planned to learn Perl once Perl6 was more mature and Larry wall released a book for it. Then I sort of just forgot about it.

perl6 has some nice features but right now it is way slower than perl.

Perl6 is kind of a stillborn and will probably never be adopted by any distro. Hell, last I tried it, it took 2 seconds to print hello world.

The features are interesting, but Larry Wall doesn't care about being easy to parse. The poor(as in the poor people who have to implement it) implementation has to parse something worse than C++;

I did perl4 and 5 and didn't see a difference other than there being all sorts of cancer to ignore. No one ever did much ooperl as it was more like a puzzle game than a language.

But that's what happened. Again, this was a widely recognized problem with Perl and why people wanted off it.

This is the actual thought process of middle class, coddled, american degenerates like the above poster

Males have X chromosomes too, you retard.

...

If a so-called "programmer" is unable to easily parse simple equivalent forms, then he'll have trouble with anything beyond Java or maybe Python, or other language that tries to enforce a single, rigid path.
But the manufactured (((problem))) you're falling for isn't exclusive to Perl. The same also applies to any language that gives you a decent level of freedom, such as C, C++, and Lisp.
The truth is much more grim: the industry jews are hellbent on de-skilling every profession, so they can lower the wages across the board and have easily replaceable worker drones that know how to insert piece X into device Y, no more, no less. They don't want intelligent, skilled workers who are able to easily negociate salary & benfits. That would actually be an equitable situation, but there is no place for such thing in this world of globalism and CEO's paid thousands of times more than workers.
On de-skilling:
youtube.com/watch?v=4rnJEdDNDsI

Dis gon be good...

You think someone who judges an entire programming language by the name of someone buried in a staff list somewhere would know what either of those are?

I think you're taking ironic Holla Forums-memes too seriously m8

>>>/reddit/

As a sysadmin you will need a scripting language with good low level OS capabilities. This pretty much has you stuck with Perl, PHP, or Ruby (Ruby's shit though so don't do it). Python and Javascript have too many shortcomings.
PHP's main advantage over Perl is that it's more widely known, so any webdev should be able to maintain your code. This goes out the window as a sysadmin, both due to Perl being more popular with longbeards, and the fact that your code will mostly be single purpose and rarely ever get fixed.
So yes, Perl's probably your best option.

Also: perl.org/books/library.html
Perl has some really great resources for learning.


I think Perl 6 should be ready enough for me to learn as a hobby when I settle down in retirement in ~45 years

My camel book arrived this week. I've heard so much about perl regex and perl one-liners I wanted to pick it up.

So far I actually prefer the syntax to python (the sigils make things more readable). The CPAN is also pretty cool and feels a bit more reliable than pip.

Sadly it also just feels really archaic. I can't imagine Perl lasting much longer.

This was a really good post that deserves more attention

fun fact:

" On the tech side, all of the team's code—mostly Perl and JavaScript—is managed and discussed through Git and GitHub Enterprise. "

fastcompany.com/3026698/inside-duckduckgo-googles-tiniest-fiercest-competitor

On a sidenote. DDG claims to be all private and shit, but it takes the liberty to both figure out where I live and present me with an interface in my native language. I hate computing in my native language.

That's weird. I'm in France and just get english stuff. Sure, there's an option to switch to french, but that's not the default.

Looks like DuckDuckGo also contributed between $25-50K to OpenBSD this year.
openbsdfoundation.org/contributors.html

I don't use Perl as much as I used to, but it is essential to have a working knowledge of it to use older (pre-2014) bioinformatics software. Edge-Pro has some major bugs in the last released version from August 2013. Almost any sequence will fail to run unless the user wades into edge.pl and renames a variable and replaces a few file paths.

DDG results are pretty good now that they use Yahoo.