Skip to main content




I've been using perl for 35+ years. As a sysadmin (and hobbyist, tool developer, whatever) it's long been my go-to language for the vast majority of my development efforts.

Over that time I've definitely seen it fading. But in the past year I've seen more concerning issues. The meta cpan website is often sluggish, and right at the moment, it's partly offline (some pages work, others, perhaps less frequently used, are offline).

Some modern Linux distros ship with a crappy set of modules. Like, no LWP. And my experience getting modules for basic functionality is not encouraging. It's very unfortunate for example that LWP doesn't know how to find installed web CAs on standard Linux distributions. Sure, I can make it work, but things just seem to be getting more and more fiddly for basic common functionality.

I've coded python a bit here and there. I've never cared for the language, but most of these concerns are surface and ultimately irrelevant, if the day-to-day experience is better than perl. And yeah, there's a lot to not like about python's day-to-day experience. The multiple confusing approaches to virtual environments and the necessity of understanding them to operate sucks. But when it comes down to it, any language style or design dislike I may have pales in comparison to the question: "is the language sufficiently supported?"

For the first time in the long history of doom-saying about perl, I'm beginning to have doubts if the answer to that question is still "yes". But maybe it's just the frustration of this one particular evening (temporary web problems while trying to find a well-supported multi-platform approach to filesystem events notification that can seamlessly work with the select() call).

submitted by /u/thomasafine
[link] [comments]






Hey folks, how do I assign the result of split() to a hash-key?

my $str ='a,b,c'; my $result = {str => split(',' $str)};

Results in: str = 'a'

submitted by /u/Terrible_Cricket_530
[link] [comments]



Has anyone tried Intel's OneAPI compiler suite to compile and use Perl? I mention OneAPI because it is available for free now (on Ubuntu, etc). I plan to give it a shot, I'd like to extended Alien::OpenMP to support it depending on how easy it is to compile perl with it.

submitted by /u/OODLER577
[link] [comments]




Does anybody remember this phrase featuring in an old story about clueless admins who banned Perl? Phil Pennock on the zsh dev mailing list knew the phrase in 1999 but I can’t find any other references to it zsh.org/mla/workers//1999/msg0…

submitted by /u/nieuweyork
[link] [comments]




Okay, so this is going to cross some borders about where the issue might be... I'm not sure where the issue is, but hopefully someone might at least have a thought.

I long ago started writing an AFP client stack in Perl. Yes, I did that. The question isn't if that's possible. (If you're interested in seeing it, it's [https://github.com/demonfoo/afp-perl](here).)

When trying to run the code on UN*X platforms (Linux, macOS, *BSD, Solaris/OpenIndiana), it works well. I've even added sendfile() support for uploading, for the platforms that support it. Over my home network, from my Linux machine to my TrueNAS Core NAS, I can transfer data over 10GbE at 5-6 Gbps. So I like to think it's pretty efficient... but Windows is a whole other world of pain.

I've recently been optimizing it, and Devel::NYTProf has been very helpful. I'd tried running it on Windows in the past, and running into issues. I originally thought it might be an issue with Perl threads (yes, it's using those too...), but based on profiling, it's not. It sends a command packet, which is just 36 bytes long, which apparently Windows' TCP stack doesn't much appreciate. It sits there for a really long time waiting for the command data to send while uploading, and I'm not sure why; using Sys::Sendfile, which wraps the Win32 TransmitFile() function, takes 5x less time for some reason, even though each call to it sends 512 KiB. And yes, I am disabling Nagle's algorithm, and setsockopt() seems to indicate it worked.

Thoughts on what I'm doing wrong?

submitted by /u/demonfoo
[link] [comments]




Hello everyone. We are writing a little script that sends a mail to a collegue or department in case of sickness. We have a website that we host that can also be accessed remote with a form to fill out.
Our problem is after trying some things that the Mail arrives with no Subject. The subject is always empty and we dont understand why. Any idea? Here is most of the Script:

if (eingabefehler() == 1) {
print $cgi->header(),
$cgi->start_html('Krankmeldung nicht abgeschickt!'),
$cgi->h1('Bitte alle Eingabefelder ausfüllen');
print $cgi->end_html();
}
else {
$abt = $cgi->param('abt');
$smtp = Net::SMTP->new('cluster.xx.xx',Timeout => 30);
$smtp->mail($ENV{USER});
switch($abt)

{

 case "xx" { $smtp->to('mail.address'); ) 

}

$smtp->cc('mail.address');

$smtp->mail($ENV{USER});

$smtp->data();

$smtp->datasend("From: Krankmeldeformular\n");

switch($abt)

 { 

case "xx" { $smtp->datasend("To: person"); }

}

$smtp->datasend("Subject: Krankmeldung\n");

$smtp->datasend("\n");

$smtp->datasend("Name: ",$cgi->param('name'),"\n\n");

$smtp->datasend("Datum: ",$cgi->param('datum'),"\n\n");

 switch($abt) 

{
 case "xx" { $smtp->datasend("department \\n\\n"); } 

}

$smtp->dataend();

$smtp->quit;

print $cgi->header(),

$cgi->start_html('Krankmeldung abgeschickt!'),

$cgi->h1('Mail versendet');

print $cgi->end_html();

}

submitted by /u/Lionsrise
[link] [comments]




Planning to replace my frontend with VueJs, looking for tips from those who have done it and some advice.

Its unclear to me how the templating or communication between Perl and VueJs woild work, dpes Vue get setup in my root directory and how does my backend communicate with the frontend?

Currently using template toolkit, so do i keep using it and embed vue or build a standalone vue app, in which case how do i serve it.

There is currently a baclend/frontend and both use template toolkit, i am only planning on reworking the frontend for now so there needs to be some backwards compatability with the rest of the project

submitted by /u/Mowntain-Goat8414
[link] [comments]



  • "Have the appropriate amount of fun."
  • "construed as a feature"
  • "It does what you want, unless you want consistency."
  • "'functional' is not to be construed as an antonym of 'dysfunctional'"
  • "leaning toothpick syndrome"

I read it at the formative age of 16.

submitted by /u/Kodiologist
[link] [comments]




The Unified Theory of Acceptance and Use of Technology is one of the dominant models used to explain why users accept and eventually use (or not) a given technology. I am not sure if anyone has applied to study the acceptance and adoption of programming languages in either voluntary (hobby) or mandatory (work) environments. Perhaps it is applicable in those domains as well. There are some newer extensions for the social media age discussed in the article that may be more relevant to the adoption of languages or the emergence of fads in this space.

en.wikipedia.org/wiki/Unified_…

submitted by /u/ReplacementSlight413
[link] [comments]





perl.com/article/197/2015/10/6…

I came across this article by Mr d F and it piqued my curiosity about the curses and ncurses ecosystem.

Among the more ambitious projects that I have found, there is an attempt to implement vi in Perl:

sourceforge.net/projects/vip/

Spoiler: It still runs, Perl is awesome. ^_^

Does anyone else have a success to share about using Perl with curses/ncurses?

submitted by /u/singe
[link] [comments]





blogs.perl.org/users/oodler_57…

Christos Argyropoulos, MD, PhD. (you know him here!) is our moderator for this virtual event, which is December 18th, 2024 - Perl's 37th birthday! At this event we will be announcing our Summer 2025 plans, which will include a 3rd Issue of the SPJ.

We have author 6 committments from some very exciting topics, but we want more! The Summer Issue has 8 authors and is nearly 150 pages. We are looking to double the number of authors, doubling the number of pages is going to be a stretch 😀.

Click here to submit your paper proposal.

Note:

In case this was not clear, I stated it so in this most recent post at BPO:

If you ever wanted to be a published Perl author, here is your chance - the Science Perl Journal issues have their own ISBNs, papers will be getting their own DOIs, and all contributors are listed as co-authors of the Issue in which they appear.

You may reach out to us on #science on irc . perl . org or on Dr. Adam Russell's very active and awesome, Perl Applications & Algorithms discord server.

submitted by /u/OODLER577
[link] [comments]



Hello. I have the following program.

#!/usr/bin/perl sub print_user_input { my $input = <STDIN>; print $input; } sub mock_user_input { local *STDIN; open STDIN, '<', \"this is fake user input\n"; print_user_input(); } mock_user_input(); __END__ $ perl ./scratch.pl this is fake user input 

I have successfully used the pattern displayed in the mock_user_input subroutine to test some user interfacing code I have. However I cannot wrap my head around how this actually works. What exactly does *STDIN mean and why does it need to be localized? Why are we passing a string reference as the third argument to open here? A detailed explanation of this code would be helpful for me. Thanks in advance.

submitted by /u/nicholas_hubbard
[link] [comments]



Guys, Perl is famous for backwards compatibility. What is the oldest bit of perl use that is still relevant that you have heard of?

submitted by /u/saiftynet
[link] [comments]



I would like to know whether function which takes complex data structure of N depth, performs ANY changes on it. Should I Dumper() before and after, use tied hashes/arrays, or some other clever technique?

submitted by /u/mpapec2010
[link] [comments]



My client would like the package files in their project encrypted to protect the source code.

I have spent at this stage around 50 hours trying various cpan modules and its just not working, i also tried compiling an exe which also just fails.

Project is running apache2.2/perl5.10/mod_perl 2.0.4 and the majority of cpan modules fail to install for some or other reason

Please help me, are any alternatives to these methods, the documentation and online resources are slim.

The project runs on a local windows environment so the files are easily accesible.

The project is also a big mess so dependencies and libraries are a bit hard to pin down.

submitted by /u/Mowntain-Goat8414
[link] [comments]



Is there a common way or best practice, for creating a HTML "checkbox" form field and marking it checked?

This is what I started using:

print qq{ <input type="checkbox" name="fieldName" value="1" @{ ($fieldValues{fieldName}) ? 'checked="checked"' : '' } /> };

submitted by /u/ComparisonExtension3
[link] [comments]




One of the reasons I keep dropping hints about #perlffi , #pdl and #openmp is that one can literally have five multithreading frameworks in the same #perl application of a master process: 1) PDL, and FFI intefacing with 2) #Fortran coarrays, 3) Fortran openmp, 4) #c openmp and 5) #cplusplus #openmp. All these frameworks can share memory addresses for array and vector objects, and #perl aided by #PerlAlien makes the authoring of the high-level code a pleasure ! hgpu.org/?p=29403

submitted by /u/ReplacementSlight413
[link] [comments]





Click here to submit your abstracts for the Science Perl Journal, Winter 2024 Issue.

To Sign up for free exclusive access to the LIVE virtual conference will be held on Perl's 37th Birthday - December 18, 2024 - to sign up for free as an attendee, please join our mailing list (information and links will be sent out some days prior to the event).

The following lengths will be accepted for publication and presentation:


  1. Full length paper (10-36 pages, 50 minute speaker slot)
  2. Short paper (2-9 pages, 20 minute speaker slot)
  3. Extended Abstract (1 page, 5 minute lightning talk slot)

Don't wait, do this today! All published authors will be presenting their papers at this virtual 1 day conference being held on December 18, 2024; and attendance will be free for everyone but you must be signed up to our to get the link day-of (will be Google Meet). All talks will be recorded and posted to a YouTube Channel.

For those interested in getting published, but unable to commit a lot of time, please note the "Extended Abstract" option. It's a great opportunity to dip your toes in the waters leading up to the Summer 2025 Issue. Let us know what questions you have, we make this a very positive and edifying experience for everyone involved. It is our hope to be able to accept as many papers and posters as possible, as such our editorial process is designed to be rigorous, but friendly and supportive.

Imporant Dates (firm):

DeadlineDate
Abstract submission deadlineMonday, September 30th, 2024, 10pm PST
Abstract acceptance emails sentby Friday, October 4th, 2024
Draft full paper dueMonday, November 4th, 2024, 10pm PST
Draft full paper feedback emails sentby Friday, November 15th, 2024
Final full paper dueMonday, December 2nd, 2024, 10pm PST
Final papers are "camera ready" for JournalMonday, December 9th, 2024, 10pm PST
Science Track Virtual ConferenceWednesday, December 18th, 2024 - time TBD

\ all times in Pacific Standard Time (PST)*

Note*: This event is being sponsored by* Perl Community and its Science Perl Committee. It is not associated in any way with the "TPRF" or the "TPRC".

For more info, contact us over email at [science@perlcommunity.org](mailto:science@perlcommunity.org)

Perl Community Impact in 2024


List of Delivered 2024* TPRC Science Track Paper-based Talks

Notes:

* We will be announcing plans for the Science Perl Journal, Summer 2025 Issue (and Science Perl Track) at the Perl Community Conference, Winter 2024. It will not be part of the TPRC in 2025.
* The final version of the Science Perl Journal , Summer 2024 Issue is being finalized and will be availabe for on-demand printing and in electronic format at Barnes & Nobles (we even have official ISBN numbers!). A seperate announcement will be made when it is available.

submitted by /u/OODLER577
[link] [comments]




I want to process lines that start on "ROW<number> blabla" and increment the number by 2. Eg: "ROW13 There's a lazy brown fox" -> "ROW15 There's a lazy brown fox".

My first attempt:

perl -pe 's/(\d+)/$1+2/e'

works but replaces numbers EVERYWHERE not just after ROW, so I tried:

perl -pe 's/ROW(\d+)/ROW$1+2/e'

but this doesn't work at all.

submitted by /u/redzorino
[link] [comments]




The latest dev release of Type::Tiny made some changes to its behavior with tie.

Being the kind of person who enjoys playing with shiny new things, I went to see how I could wrangle it into core classes:

```perl use v5.40; use experimental qw<class>;

class Foo { use Types::Standard qw<Int>; field $bar :param; ADJUST {tie $bar, Int, $bar} }

Foo->new(bar => "baz");

Value "baz" did not pass type constraint "Int"


```

Neat!

submitted by /u/m_dango
[link] [comments]



submitted by /u/plicease
[link] [comments]


Looking for Claus Färber (github: cfaerber, cpan: CFAERBER) to see if we can get a fix and release in for Net::IDN::Encode on newer versions of #Perl (github.com/cfaerber/Net-IDN-En…). If anyone knows how to contact him, please let me know. If nobody is interested, then I am happy to adopt the module.





There was a cool neon-sign-style sticker given out at TPRC 24 which has a dart board and a dart in the bullseye, and the dart board is on fire...just curious

submitted by /u/thelastcubscout
[link] [comments]




Kind of retired now after developing with Perl for the past 20 years, but I still maintain a large Perl code base as a hobby for a club. Just as well as there's little Perl work around in the UK.

The last straw was a mix of things, that `LWP` doesn't support `HTTP2` (so I have to `qx" curl ... "`), the syntax of destructuring a hash-ref, and that no one (in the club) but me knows (or wants to know) Perl, so there is no succession plan.

A large part of the site is Javascript, which made node-js the best migration target as I already half know it

For me, it's a worthy successor to Perl. Its actually quite similar. The language is already way too big (and getting bigger) so that you can look at someone else's code and not understand it 😀 And NPM is like CPAN, lots of similar modules, half of which abandonware, to choose from and you don't know which one to choose

Sure, some things are better... built-in curl (ie fetch/LWP) and convert to/from JSON, JSON like syntax for variables, destructuring objects, private variables and methods in classes, package.json (a config file)

And some much worse ... no `/x` on regex, no `statement if condition`, no auto-vivifying, no log4perl or template toolkit, no "-e file" ). It really pisses me off removing whitespace from regex knowing that /x will be added as a language feature one day. Yes I could of ...

But, overall, more things are better than worse.

In case you try it, even with a convert script, its a lot of work and a little tedious at times going through line by line

It would be great to have a version of Perl with JSON syntax for variables, but I guess, as it would break everything, it is too late.

To all those who have maintained Perl and CPAN modules over the years, THANK YOU.

submitted by /u/Loose_Potential6985
[link] [comments]



This project is moving along just fine. Below is the current leaderboard. It's not about personal module count, it's creating more awareness about Perl. Also, some of these APIs are actually pretty neat! E.g., there's a "card deck" API for card playing programs.

All are invited to participate. Please click here for the rules and to claim the API. This is a great way to get your first CPAN module published, which is a major milestone for any Perl programmer. It's also great for experienced devs to blow off some steam or hone their skills. If you're new to CPAN and need help, email me directly at [oodler@cpan.org.](mailto:oodler@cpan.org)

The runner of FreePublicAPIs has been extremely supportive of this effort. He even created a site API for us, and I obliged by creating a real Perl client for it!

I'd like to specifically request that anyone using any of the new Perl stuff like signatures or Corinna/class to submit some as non-contrived examples of how they work or as proof of why people should use them. Here is a good summary of the new features in Perl 5.40 - give it a shot! I may even try something other than my Dispatch::Fu and Util::H2O::More modules, even though they makes writing commandline tools with subcommands and web API modules dead simple - TIMTODI!

ClaimedPAUSEAPI InfoModule NameStatusCompleted
2024-08-28OODLERkanyerestAcme::Free::API::YeCompleted2024-08-28
2024-08-29OODLERchuck-norris-jokes-apiAcme::Free::API::ChuckNorrisCompleted2024-08-29
2024-08-30OODLERreddit-stocksAcme::Free::API::StonksCompleted2024-08-30
2024-08-31SANKOadvice-slip-apiAcme::Free::Advice::SlipCompleted?2024-09-03
2024-08-31SANKOunsolicited-advice-apiAcme::Free::Advice::UnsolicitedCompleted?2024-09-03
2024-09-01CAVACip-geolocation-apiAcme::Free::API::Geodata::GeoIPCompleted2024-09-01
2024-09-03OODLERdog-apiAcme::Free::Dog::APICompleted2024-09-04
2024-09-03SANKOinsult-apiAcme::Insult::GlaxCompleted?2024-09-03
2024-09-03SANKOevil-insult-generatorAcme::Insult::EvilCompleted?2024-09-03
2024-09-03OODLERapiAcme::Free::Public::APIsCompleted2024-09-06
2024-09-06OODLERkeyval-apiWebService::KeyValPending
2024-09-07HAXipifyWebservice::IpifyPending

submitted by /u/OODLER577
[link] [comments]





SlapbirdAPM now generically supports DBI!Hey friends, a few weeks back we introduced SlapbirdAPM (an open-source Perl application performance monitor), and received some great feedback from the community!

Today we'd like to announce that you are now able to track DBI queries in your applications (only available for Dancer2 and Mojolicious for now), regardless of your database, ORM, etc. Here's what it looks like! You can see the dancer2 code that generated these queries here.

preview.redd.it/l2jvz1bne8nd1.…

This is just one of the many monitoring features provided by SlapbirdAPM, hopefully you find them as useful as we do! And a reminder we have a *forever* free tier available for everyone!

submitted by /u/ivan_linux
[link] [comments]




Since the language formerly known as Perl 6 has officially gone off on its own, has there been any effort to implement a true Perl 5 successor?

In my opinion, Raku tried to do too much with the syntax itself, scaled Perl's flexibility to infinity, and made itself unusable.

Perl 5 does not need much for it to become a "modern" language. Instead of extending the flexibility of the syntax, the direction for Perl 6 should emphasize standardizing core utilities to facilitate integration with modern workflows.

- Package/module management and import/export could benefit from streamlining
- Stronger LSP and debug/error tooling (Rust has spoiled me)
- "Prettier" auto-formatting for source code (For those 30yo system scripts, you know the ones I mean)

What would be on your wishlist?

submitted by /u/J_Stach
[link] [comments]