I'm a sysadmin who has very little experience with perl (who am I kidding, none). I recently came across some legacy code that "broke" due to migrating systems which leads me to some questions. Specifically the problem had to do with UTF8 support. Our environment requires supporting french characters.
what are the pros and cons of using these two?:
# open(MAIL, "| /usr/sbin/sendmail -t -oi")
# use Net::SMTP;
postfix is installed on all systems in question. If it matters the old systems are rhel7 based and the new systems are rhel9 based.
In my attempts to troubleshot the code vs system issues - using NET::SMTP worked very well for me. But the Devs not wanting to update their code insist I find a solution for their old sendmail version. That was done by setting postfix to "smtputf8_enable = no".
So what are the pros and cons of each method?
What are use cases for one over the other?
Are there other better modern ways of sending email either with perl directly or by using the systems smtp app?
submitted by /u/cwheeler33
[link] [comments]
I have no idea to what extent this is official, but GitHub is not updating any Perl package in the GitHub action runners. This is the current response to a request to post back LWP::protocol::https
which was there before, but vanished, needing an installation that takes a good amount of time.
submitted by /u/Sea-Bug2134
[link] [comments]
Add LWP::Protocol::https · Issue #10567 · actions/runner-images
Tool name LWP::Protocol::https Tool license Artistic Add or update? Add Update Desired version latest Approximate size No response Brief description of tool Runners already include LWP::Simple and ...GitHub
[link] [comments]
Day 23: Generic, general random number simulation using the Inverse CDF method in PDL
Random numbers from scratchpdl.perl.org
A big of blogging around Catalyst and handling complicated incoming request data.
https://dev.to/jjn1056/catalyst-tricks-map-request-parameters-to-a-model-44fa
submitted by /u/jnapiorkowski
[link] [comments]
Catalyst Tricks: Map Request Parameters to a Model
Introduction Dealing with incoming request parameters (both query and body parameters) is...John Napiorkowski (DEV Community)
Recently I've decided to pick up Perl because it looked like a pretty cool language. The native regex, maturity, expressiveness, and strong unix ties is what gravitates me to the language. No shade on Python and the more popular languages, but I feel like Perl is a very capable language that doesn't get much love.
A language is just a tool. A tool used to get the job done. Now a particular tool may not be the "best" tool in the toolbox for the job, but that does not make it any less viable.
I've been doing some research on game development libraries with Perl, and came across some SDL bindings that I'm not quite sure are SDL1 or SDL2. But I believe they are SDL2 bindings. My confusion stems from seeing a particular software in the past versioning itself as v2 for the first predecessor/iteration of a software.
It doesn't appear to be actively maintained, but it does seem to be the best thing available for game development.
http://sdl.perl.org/index.html
Can someone confirm this ?
submitted by /u/Warm-Scholar6106
[link] [comments]
[link] [comments]
(dxxvii) 14 great CPAN modules released last week
Updates for great CPAN modules released last week. A module is considered great if its favorites count is greater or equal than 12. App...niceperl.blogspot.com
grep-like code search tool ack has been updated to v3.8.0. It's available on CPAN as App::Ack, or at https://beyondgrep.com/
The big new feature is that you can have boolean matches on the line.
bash ack this --and that --and other and this --or that --or other ack this --not that --not other
submitted by /u/petdance
[link] [comments]
Hi everybody!
I am interested in learning the basics of programming in general, and I am looking for a good first language. I am very impressed by perl's abilities in formatting strings, something which is very difficult in C. Does perl not teach something necessary about general programming? I am not looking to learn OOP or functional programming specifically, just to get the basics down. I can then adapt these basics to other languages. So, has anyone learnt perl as their first language? Why would one recommend against it? I want to hear your opinions. Thank you for reading all this!
My thanks!
submitted by /u/chrisonlinux
[link] [comments]
submitted by /u/briandfoy [link] [comments] |
This is a list of Perl::Critic policies that CERT recommends (www.securecoding.cert.org/confluence/display/perl/CERT+Perl+Secure+Coding+Standard)
This is a list of Perl::Critic policies that CERT recommends (https://www.securecoding.cert.org/confluence/display/perl/CERT+Perl+Secure+Coding+Standard) - cert-perl-critic-policies.txtGist
Dear all,
given the versatility of generative AI, I want to test it at home. And I would prefer being able to do this in Perl instead of having to master Python.
But: Are there any non-obsolete Perl packages that allow local LLM access? For example, the scripts on [the MiniCPM-V-2_6 page](https://huggingface.co/openbmb/MiniCPM-V-2\_6) don't look frightening, but how would those be translated into Perl?
Basically, my main interests are:
- multilingual text embedding (yes, I am dreaming of a Perl-powered RAG)
- access to an instruct model, e.g. for content augmentation
- if possible, OCR with higher accuracy than tesseract
Thank you very much.
submitted by /u/Patentsmatter
[link] [comments]
Is it possible in Perl to { = BEGIN } = END
so
sub some sub BEGING ...code... END
Having a non English keyboard makes the various []{}|\ more complex to enter:
\ is "7 + option + shift" on a MAC whereas on US keyboard most have their own key and it is pretty straightforward.
I try to experiment with various ways to to make this easier. Still haven't found my. sweet spot. This is just another attempt.
submitted by /u/NoeticIntelligence
[link] [comments]
[link] [comments]
Day 16: These are Testing Times, Indeed!
Using Test::PDL to explore matrix multiplicationpdl.perl.org
[link] [comments]
Day 17: New operations for Perl Data Language
New operations for PDL (Perl Data Language)pdl.perl.org
I want to install tarball of perl 5.38.0 with wget, but it just freezes. Is there other mirrors other than cpan.org ?
Or i just doing something wrong. I am in Russia (I even tryed different proxies - dont help)
submitted by /u/braam76
[link] [comments]
In the spirit of shiny containers gathered neatly under the festive tree, I spent some time using Podman to make a rootless "dockerfile" that contains ALL THE Perl REPLs... as well as a few other useful bits and Object::Pad so people can see how cool the Class/Role syntax is.
Here is the container. Yes, it's big, you will need broadband. ^_^
https://hub.docker.com/r/jemi298/perl-repls-debian
I recommend Podman, but with Docker/Podman, pull the image and give it a try. I tried to make this a "easy"... I'm sure it will download and run faster on your PC than it builds on mine! You could do something like:
Run Devel::REPL... $ use strict; use warnings; use feature 'say'; $ use Object::Pad; $ my @aNumbers = map { $_ } 100..999; $ role rVox { > method doMsg ($inMsg) { say $inMsg; } > } $ class cTEST { > apply rVox; > } $ my $oT=cTEST->new; $ $oT->doMsg(__LINE__. " hello from a REPL!"); 6 hello from a REPL!
The container is based on Debian:Slim (slim, ahem), so let's recognise up front that compared to Alpine Linux, Debian:Slim is a whale! And Devel::REPL in particular depends on a herd of Moose...
This is a learning image, those keen for cloud deployment will not want this to run up their cloud bills.
Here are some of the previous discussions about Perl and containers:
https://old.reddit.com/r/perl/comments/12vv8g4/quick_tip_run_local_perl_code_using_podman_to_run/
https://old.reddit.com/r/perl/comments/sd5403/tiniest_perl_docker_image/
https://domm.plix.at/talks/writing_a_good_dockerfile_for_perl_app.html
Merry Containering, Perling, and REPLing!
submitted by /u/singe
[link] [comments]
[link] [comments]
Day 15: Pitch detection
An explanation of (part of) Praat's pitch detection algorithm using PDLpdl.perl.org
[link] [comments]
Day 15: Pitch detection
An explanation of (part of) Praat's pitch detection algorithm using PDLpdl.perl.org
[link] [comments]
(dxxvi) 7 great CPAN modules released last week
Updates for great CPAN modules released last week. A module is considered great if its favorites count is greater or equal than 12. App...niceperl.blogspot.com
Randal Schwartz is giving his "Half My Life with Perl" talk tomorrow Saturday, December 14, at 5:00 PM - 7:00 PM EST. You can register for the livestream.
I think the video will also be available later, and when I know those details I'll post those too.
submitted by /u/briandfoy
[link] [comments]
Randal Schwartz: Half My Life with Perl
As part of year 25 of The Perl Advent Calendar, Perl luminary and co-author of O’Reilly’s “Learning Perl” Randal Schwartz will be giving a presentation entitled "Half My Life with Perl". Randal says: This event will be a live stream via Zoom.lu.ma
Me: oi, there's like a few dozen modules I need to rebuild that have changed their maintainers, so their CPAN paths all changed, now I need to update them all, sounds like a bit of busywork, 'innit?
MetaCPAN: don't fret, we have this nifty feature where you use the /modules/by-module/X/X-Y
paths, and those won't change!
Me: OK mate!
... time passes ...
... I need to rebuild the packages again.
Me: MetaCPAN, mate, do you know why am I getting 404 pages instead of tarballs under all /modules/by-module/...
links? Now I have to change them all back to author-based ones! Sounds like busywork again, 'innit?
MetaCPAN: LOL LMAO
submitted by /u/WesolyKubeczek
[link] [comments]
[link] [comments]
Day 12: 3D visualization of scalp electrode sites can be done with Perl
3D visualization of scalp electrode sites for EEGpdl.perl.org
Is there a way to directly include a variable declared in a dumped config file in one of my scripts? The structure of the file is below:
{ my $variable = { “key1” => { “key2” => { “key3” => “value1”, }, }, }; }
1;
As you can see, the variable declares a deeply nested hash_ref which I don’t want to have to parse manually. I also don’t have any control over the dumped variable file, the design flow I am working in dumps that format and it would both be cumbersome to try and get the script owner to modify the output to use our instead of my and this could anyways possibly effect currently existing downstream flows that depend on this specific format. As for why we didn’t use a yml in the first place, no idea lol
For reference, I need to take a list of keys from within the hash and iterate over each element
submitted by /u/Its-goodtobetheking
[link] [comments]
[link] [comments]
Day 11: Random Number Generation with Perl Data Language
Random Number Generation with PDL (Perl Data Language)pdl.perl.org