Love this article on the importance and philosophy of Perl
https://www.wired.com/story/programmers-arent-humble-anymore-nobody-codes-in-perl/
I have to use Python and Go which both feel less interesting and creative. I love when we lean into how the world is, sloppy and unpredictable. I loathe people and designs that attempt to control or perfect the world.
I absolutely love Perl. The world is a darker, much less interesting place if we've decided to dumb down our programming languages. Language impacts the way we think about problems. Having a single way to solve every problem will only ever get you to mediocrity. TIMTOWDI and DWIM make it possible to express ideas in new and interesting ways.
The "one, true way" approach of Python and Go seem to make it easier for AI to consume the entire programming field. Have you tried working in Perl with AI? Ha, good luck. The lack of actual comprehension becomes entirely obvious.
Probably few noticed, but it looks like mirrors.cpan.org might have stopped serving web requests earlier this month. It was being phased out awhile ago AFAIK, but I'm sure there are plenty of dead links out there now.
Last wayback copy of the page is here: https://web.archive.org/web/20250711025750/http://mirrors.cpan.org/
Every once in a while I'm just flabbergasted by how bad #Perl error-handling is, or at least old-style error-handling before Perl's version of exceptions started to catch on.
Like, the "messages" method of a "Mail::IMAPClient" object returns an empty list if there are no messages to fetch, but it returns undef (a scalar, not a list) if there was an error, so you can't just do "!@msgs" to check for an error, you have to do "@msgs==1&&!defined($msgs[0])". Ridiculous.
#programming
I've recently uploaded a new version of the #Perl #Catalyst plugin to #CPAN
Catalyst::Plugin::Static::File is an extension for serving a single file that plays nicely with #Plack especially Plack::Middleware::XSendFile and Plack::Middleware::ETag.
https://metacpan.org/release/RRWO/Catalyst-Plugin-Static-File-v0.2.4
The new version has minor code changes but requires a more recent version of Catalyst. There's also a lot of reorganisation of the documentation.
I didn't know anything about this! Cool
"Before Larry Wall created Perl, he studied linguistics. Unlike other programming languages designed around a mathematical notion, Perl's design emulates how people communicate with people. This gives you the freedom to write programs depending on your current needs. You may write simple, straightforward code or combine many small pieces into larger programs. You may select from multiple design paradigms, and you may eschew or embrace advanced features.
Learning Perl is like learning any spoken language. You'll learn a few words, then string together sentences, and then enjoy simple conversations. Mastery comes from practice of both reading and writing code. You don't have to understand every detail of Perl to be productive, but the principles in this chapter are essential to your growth as a programmer."
https://www.modernperlbooks.com/books/modern_perl_2016/
#perl #larrywall #programming
Code review.
A regular source of #Perl bugs is when developers forget that DateTime has mutable state:
return $dt->add( days => 7 )
changes $dt.
I just realized I could write #Perl which writes more Perl, which will then run that Perl
So many possibilities
BRB Building myself an arsenal of foot canons...
@domm: Oh fsck, #mst died? Very sad to hear. I still remember that he offered help and advise when I took over #Lintian, especially about the web backend (which the previous Lintian maintainer started to rewrite from scratch but never finished) where mst seems to have been involved from the #PostgreSQL side. He was also often present in #Debian's #Perl IRC channels and we chatted occasionally, not always about Perl. I think I also met him IRL once, but I'm no more sure where.
Oh my gosh, I didn't know that Matt Trout died. He was a definite "presence" in the Perl world.
The last time I interacted with him was years ago. He was trying to convince to me to get involved in taking on XS components of some CGI-related modules. I'd have rather had needles pounded into my eyes.
I always appreciated his bluntness. And his very fast, sharp intelligence.
I didn't even know he wasn't able to work much lately. Godspeed Matt.
https://www.shadowcat.co.uk/2025/07/09/ripples-they-cause-in-the-world/
@profoundlynerdy That's a purely syntactic issue. You want (...)
to be parsed as the (...)[...]
list slice operator, but here say
gobbles it up for the say(...)
function call syntax. Two solutions:
say((split " ", "Foo Bar")[0])
say +(split " ", "Foo Bar")[0]
(I changed split / /
(which splits on single spaces) to split " "
(which splits on any kind of (repeated) whitespace) because that's usually what people want. If you need " Foo Bar"
to become ("", "Foo", "", "Bar")
, use split / /
.)
Solution #1 simply nests the syntactic structures: You have a list slice (...)[...]
inside a function call say(...)
. Solution #2 (ab)uses the unary +
operator, which is a no-op, but syntactically separates say
from (
, thus preventing (
from being parsed as the start of an argument list.
But if you only want to extract the first "word" (chunk of non-whitespace) from a string, you could also use say "Foo Bar" =~ /(\S+)/
.
Dumb Perl question, because I'm insufficiently caffeinated, the answer isn't coming to me and my DDG-fu is failing me. Given the Perl one-liner that prints "Foo":
```
perl -E 'my @a = (split / /, "Foo Bar"); say $a[0]'
# Foo
```
How do I rewrite it so that an intermediate variable is not required? Doing `say ( ... )[0]` won't work, because `()` controls precedence, it doesn't construct an array. Can't seem to make it work I'm annoyed.
Fixed a bug and reworked all the documentation for the CLI::Helpers 2.2 release. #perl #cli
https://metacpan.org/pod/CLI::Helpers
Perl has such a great ecosystem. Dist::Zilla, Pod::Weaver, Getopt::Long::Descriptive, Mojolicious, Moo, Type::Tiny. Handling #YAML is *so* much better in Perl than it is in any other language, bar none.
Why isn’t #Perl popular anymore? It’s got plenty of libraries.
Perl-Guru Matt Trout ist mit nur 42 Jahren verstorben. Sein Wirken prägte die Entwickler-Community tief und wird unvergessen bleiben. Ein großer Verlust für die IT-Welt. Mehr Infos hier: https://www.heise.de/news/Perl-Guru-Matt-Trout-ist-mit-42-Jahren-gestorben-10488234.html #RIP #MattTrout #Perl #TechCommunity #newz