TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What is Modern Perl

90 pointsby davorgalmost 13 years ago

9 comments

chernevikalmost 13 years ago
I'm torn between thinking there is value in learning some Perl and not really knowing that value might be.<p>I've found a lot of embedded wisdom in the "old school" stack. If you edit in vi, add some sed / awk / grep, and learn some bash, you'll find these tools start to come together and leverage one another up substantially. Perl might be more post-Bell Labs but it still was written and used by smart people to Get Stuff Done. It stands to reason that there are large returns on learning it.<p>But it isn't as approachable as Python. When I needed a glue language, I first looked at "Learning Perl" -- after a few days I concluded that, if this was The Path, then I would never get There. Python was much more approachable, and my code already gathers so many hacks that I'm glad my language forces me to make these at least somewhat intelligible.<p>I would learn Perl faster now. But for what? I've learned some PHP to meet client demand, and for web development the next language would be RoR. I bet Perl is better than bash for various sysadmin and utility tasks, but bash feels good enough for the simple stuff I do. If I needed to do something really beyond bash I'd turn to Python, and I'm not sure why Perl would be better. I suspect there's a lot of general knowledge embedded in Perl but I'm not sure how that gets extracted and made current among today's toolset for the tasks I have.<p>So to my mind, Perl is something of a sysadmin tool, better than bash and very useful for a workload focussed on system and file processing, on *nix, without much service to HTTP. I'd love to hear how it pays returns for people more focussed on back-end support of web development.
评论 #4160092 未加载
评论 #4157455 未加载
评论 #4158116 未加载
评论 #4162365 未加载
smugengineer69almost 13 years ago
What is modern Perl? Python. (I'll elaborate more here from my earlier one-word answer).<p>Long-time perl programmer here, until I found Python. Perl is powerful, but Perl is for the programmer, not the programmer's coworkers. It's not even for the programmer 6 months down the line. This is nothing new, and it has become a stereotype in the community.<p>Yes, this argument has been made and refuted many times, but I argue the reason isn't the language, but the dominant language paradigms.<p>Perl's "monk" ideal is not sustainable in the long term, and encourages "clever hackers" who can do things with the fewest lines of fundamentally unreadable code. Yes, the language has evolved. Yes, it is slightly easier to read now. But the goals of the community still tend toward the ideals of becoming a master of arcana who can pass his wisdom down to the less experienced.<p>Give me a language that the commoners can read, that a beginning programmer can feel empowered to learn because he can take one look at the source code of someone truly experienced and know at least a part of what is going on.<p>You can change Perl all you want, but you cannot get away from the fundamental guiding principles of the language, which encourage antisocial, clever, and magic code.
评论 #4156998 未加载
评论 #4158269 未加载
评论 #4158185 未加载
评论 #4157289 未加载
评论 #4158367 未加载
评论 #4157076 未加载
评论 #4157298 未加载
评论 #4157077 未加载
评论 #4157303 未加载
r4vikalmost 13 years ago
I actually own the domain modernperl,net, for trollish reasons actually (www.modernperl.net redirects to Ruby) but if anyone wants it / wants to do something useful with it. I'd be happy to transfer it to you for free.
评论 #4158167 未加载
kamaalalmost 13 years ago
I started using Perl around 2006'ish, that was pretty late in the day compared to most Perl hackers. I was primarily a C/C++ Dev, going the OO way. And I was doing Java here and there.<p>Until one morning a colleague of mine, saw me doing some stuff I was taking really long to finish. He just walked up to my cubicle and just said 'Why dont you use Perl to do this' and then started my crazy journey with Perl. What I really like about languages like Perl/Python and Ruby is how quickly you can go from learning to building something really useful.<p>Perl has seen atleast 3 major rise in its popularity since its inception. First one among sysadmins, its from these days that you will powerful terse, small but elegant solutions to a range of problems. If you ever get a chance, do browse and read essays from Tom christiansen written during those times. They are just pure gem. The second was during Perl/CGI days. And third was the most recent with the Modern Perl movement. Much of the thanks for this goes to People like Chromatic, Audrey, People of p5p, Moose devs and etc. From each of those times, you will see varying variety of code written. Starting from really amazing one liners to at times some frustrating code during the dot com bubble, to now where Perl code really looks very nice.<p>Modern Perl really is set of many successful sub projects. And its not just code, it covers everything. Code is just the beginning. To give you an example, these days you have very nice cpan package managers. You can search packages using Metacpan in a very user friendly GUI with nice syntax highlighting. You have awesome documentation, Modern Perl book really is the Perl's equivalent of the K&#38;R book. There is Moose, And there are things like Class::MOP. There are things like DBIx::Class.<p>In terms of other new breath taking stuff you will see things like Devel::Declare. This allows new syntax extensions to be written using Perl itself. Then as a result you have a range of modules like Moosex::&#60;extensions&#62;,Try::Catch, Gather::Take etc.<p>In terms of web frameworks your have Catalyst.<p>So its really these many many successful subprojects together which form 'Modern Perl', if you wish to describe it that way. Its no one thing. Code, documentation, culture, events, infrastructure etc etc all together form the 'Modern Perl' thing.<p>If you come to the Perl core development, then they have real good time based releases. They are fixing bugs, adding new features, and doing a lot of amazing stuff. There have been pretty neat syntax features added in the past few releases and I guess much of Perl 6 based features will continually seep into Perl 5 as needed over time.<p>Modern Perl, or other wise. Perl continues to retain its niche. Which is text heavy lifting, automation, rapid prototyping, development, a deep learing curve and larger gains in productivity with time. Its still the go-to tool for most back end tasks. If you wish to get something done faster, with little effort, sanely with little bugs in say over a weekend, You have little alternatives apart from Perl. If you are in dev ops and you have P1 tickets standing on your head pretty often, a tool like Perl is indispensible.<p>And most importantly its areas of strengths are only growing- Unicode, regular expressions, CPAN, powerful syntax etc. If you ever get a chance Higher Order Perl is one book you must read. It really opens your mind to elegant solution to a range of problems.<p>But like every other language, you need to invest time and effort incrementally to keep yourself updated.
评论 #4156951 未加载
评论 #4157906 未加载
jbogganalmost 13 years ago
I started picking up Perl (as my first programming language) in 2003 while working in a genetics lab. I used it for years on a number of bioinformatics projects due to its strengths in tackling disparate sources of often irregular information. Recently I've been using it for the Kaggle Facebook competition simply because I can iterate my designs faster than in any other language. I'm looking forward to learning a few of these more newfangled modern appurtenances of Perl.
sausagefeetalmost 13 years ago
I really wanted to see what Modern Perl looks like.
评论 #4156522 未加载
评论 #4157209 未加载
alrondyalmost 13 years ago
In perl culture, "Modern Perl" refers to bad programming by a core group of egocentric, sanctimonious developers who are to Perl what Lennart Poettering is to Linux.<p>There are now dozens of CPAN modules with names like "common::sense" and "Modern::Perl" that provide no useful code, but introduce packaging dependencies and administrative overhead in the name of not having to type "use strict;" out by hand.<p>Modern Perl is using Moose::Any instead of just using a language that does what you want. Modern Perl involves an average of 130 CPAN dependencies for any give application.<p>Modern Perl is when perl stopped being perl and started being awful.
评论 #4156970 未加载
评论 #4157490 未加载
评论 #4158870 未加载
评论 #4158876 未加载
trebuch3talmost 13 years ago
Writing a book on Modern Perl is nuts.<p>As the author of this post points out, there have been about twenty releases since Perl 5.6, when the book was published. Features like the "switch" and "state" keywords have been introduced. If you look away too quickly, another database interface crops up, or people are doing objects differently. Perl changes so often that writing about it is like trapping a unicorn.<p>It's impressive that users of a 25-year-old language are not afraid to improve upon it (with the caveat that it stays backwards compatible). But since I started using $OTHER_LANGUAGE I don't have to worry about keeping up to date because language features change twice a decade.
评论 #4157120 未加载
评论 #4160147 未加载
评论 #4157461 未加载
gourangaalmost 13 years ago
Python!<p>Sorry couldn't resist.
评论 #4157696 未加载