Skip to main content


Hi, I am installing braker and it requires a set of Perl modules to be installed. I am having a hard time installing the YAML::XS module. I am using Perl v5.38.

The Perl module was installed using cpanm command, and when I run perldoc -l YAML::XS it shows There is No documentation.

The directory, where the libraries and executables exist, was added to the PATH and PERL5LIB environment variable, and still the XS.pm is missing in the YAML folder.

I tried to re-install the library in two different ways: cpanm --local-lib=~/perl5 --reinstall YAML::XS and cpanm --force -v YAML::XS still not resolved.

What is happening here, should I install a different version of Perl? Is it possible to manually install YAML/XS.pm?

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



London Perl Workshop 2024 - Preview : Perl Hacks submitted by /u/davorg
[link] [comments]


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


The URI module took a short holiday, but quickly returned. Just for giggles, I'd like to see everyone react (positivily) to u/oalders in the Github issue:

  • Can we get 100 reactions?
  • Can we get all the reactions (so, thumbs down is really just for completeness)
  • Can we star the heck out of the libperl-www repo?

There are people who take care of things so most people never notice when something goes wrong, and from the time I reported this to resolution was three hours (although the issue was already known, I think). That's some pretty good support right there, and we should fête over that.

For what it's worth, GitHub pays attention to these things. When I filed an issue about getting them to think about putting Perl in their Advisory Database, the number of reactions that issue got made them think about it (right now it's a whole process with scheduling dev time, etc). One of the ways to show that Perl is alive is to react to Perl things (um, that deserve it, not bot spam!).

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



Hi I am new to this stuff

i want to use scriptthis perl script to simulate the https requests performed by the deep testing app (for realme devices)

now i need to run this script on (strawberry perl)

but i have no pc to do this

so how can i run perl script on termux

everytime i do this on termux

i get this

https://files.fm/u/8jt4mfg5g7

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



Basically, my Perl code wants to achieve the following :

my @array = qx{cat /some/servers/list}; # this is working

my $port = 30004;

foreach(@array) {

my $return_code = system ("/usr/bin/nc -zv", $_, $port) # wanting to run nc -zv hostname 30004

But it just isn't working.

What I've tried so far :

  1. foreach(@array) {

my @ args = ($_." ".$port)

my $return_code = system ("/usr/bin/nc -zv", @ args)

  1. Used IPC::System::Simple qx/systemx/ and then passed the whole thing thru systemx instead of system
  2. Used qx, Used exec, doesn't work.

Note: I need the return code for rest of dependant logic down the road, so have to have the $return_code scalar.

Please help! I'm at my wits end!

submitted by /u/icy-mist-01
[link] [comments]







I use Net::SMTP to send emails when a user requests data, and I have the email BCC'ed to my personal Gmail. But while it appears that the user does get the email (even when using Gmail), it's not showing up in my Gmail.

Any suggestions on what the problem might be?

I'm using these modules:

use Net::SMTP; use MIME::Lite; use Digest::MD5 qw(md5_hex); 

And this is the script:
$from = 'noreply@example.com'; $login_pass = 'blahblahblah'; $messageID = time(); $msg = MIME::Lite ->new ( From=> "Me <$from>", To=> "recipient@gmail.com", Bcc=> 'me@gmail.com', Subject=> "Subject", 'Message-ID'=> '<' . $messageID . '-' . md5_hex($from) . '-' . md5_hex($found_email) . '@example.com>', Type=> 'multipart/alternative' ); $msg->attach( Type => 'text/plain', Encoding=> 'quoted-printable', Data=> qq~ Plain text version of email ~ ); $msg->attach( Type => 'text/html', Data=> qq~ <b>HTML version of the email</b> ~ ); $msg->scrub(['x-mailer', 'Content-Disposition']); $smtp = Net::SMTP->new( 'mail.example.com', Port => 465, SSL => 1 ); $smtp->auth($from, $login_pass) or die('Could not authenticate'); $smtp->mail($from); if ($smtp->to($found_email)) { $smtp->data(); $smtp->datasend( $msg->as_string() ); $smtp->dataend(); } 

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


The notes from the latest meeting of the Perl Steering Council mention:

We exchanged Perl (re)branding ideas with Olaf [Alders]. We will be keeping in touch on that front.

Does anyone here know whether this is only about the camel logo owned by O'Reilly or if there are some bigger changes coming (Perl 7?)?

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



Hello,

I'm trying to install Request Tracker and in the process am receiving an error that states:

Some dependencies were missing:
DBD::mysql >= 2.1018, != 4.042 ................... MISSING

I'm lost. How to do I resolve this?

Thank you!

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



Did anyone else receive unsolicited email from the Science Perl Committee announcing a journal for sale? I'm not sure how or why they added my email address to the list. It'd be interesting to see if others also did so.

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






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


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


I am quite thrilled to announce that after several months of hard work, I have released the perl module DateTime::Format::Intl. It mirrors its JavaScript equivalent of Intl.DateTimeFormat. The algorithm is quite elaborate, replicating how it works in web browsers. I also had to develop quite a few dependencies to make it work, notably Locale::Unicode and Locale::Unicode::Data, which provides access to all the Unicode CLDR (Common Locale Data Repository) data as an SQLite database via an extensive number of perl methods. I hope it will benefit you and supports you in the internationalisation of your projects in perl.

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



Hey, I am writting in perl since few years I have written lots of stuff over the years however would consider myself more beginner, I love syntax and the fact that perl is almost on every linux. My main usecase is system scripting/parallelizing tasks/ some API clients.

I have felt in love threads::queue and inotify2 implementation and use them very frequently.

Module management - What is more nowadays standard to manage them?

I use cpan, or download module from cpan and execute perl makefile or later generated C Makefile.

However sometimes struggle:

Last example that comes to my mind:

I want to create simple app that interacts with cassandra and any module I try to gather is based on deprecated IO::Sockets::INET6 - also have disabled ipv6 and not able to build it. Is there any package manager that ships modules in some more portable formats?

If I build module that for example needs some .so that is bound to kABI [Inotify2] I push them to system perllib path. I understand that it is based on kABI and need to recompile with kernel-headers. But is there any more portable solution. My feeling is that on python side managing pkgs with pip is easier.

submitted by /u/Recent-Astronaut-240
[link] [comments]



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


Perl Community Conference Winter 2024When: December 18th (on the day of the 37th Birthday of Perl)

Where : Virtual

Dress Code : Whatever you want

Price : FREE

How to join : sign up for the mailing list (QR in image), or https://perlcommunity.org/science/#mailing_list)

Wanna know more : https://science.perlcommunity.org/spj#top

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



Improving Website Accessibility with Perl and OpenAI submitted by /u/OvidPerl
[link] [comments]



perl -CS -E'say v74.65.80.72'

I wanted to grok how deeply I didn't understand what this was doing, so I also made some modifications:

while true; do perl -CS -E 'say eval ( sprintf "v%s", join ".", map { int rand 1024 } ( 0 .. (int rand 24) + 8 ) )'; sleep 1; done

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



Doing some Unicode research I'm finding several different ways to generate Unicode characters:

```perl binmode(STDOUT, ":utf8");

my $thumbs_up = "";

$thumbs_up = "\x{1F44D}"; $thumbs_up = "\N{U+1F44D}"; $thumbs_up = chr(0x1F44D); $thumbs_up = pack("U", 0x1F44D);

print $thumbs_up x 2 . "\n"; ```

What is that \x syntax? I tried looking it up on Perldoc and couldn't find anything. Is the \N specific for Unicode?

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



Bit of a weird question:
I am working on a save game editor for an old game that nobody cares about, and I have to run a Perl script as part of it.
I have been trying to convert the logic of the script to C#, which I am writing the application itself in, but due to differences in how Perl and C# handle bytes, this is proving impossible for me to figure out with my limited skill set. If anyone would like to workshop this issue, I would welcome the help.

Anyway, my question: Since I need to include the script with my application, the user needs a way to run it. I would like to avoid having the user install Perl themselves, as that would just be another step I'd have to troubleshoot every time someone had a problem.
So would it be legal for me to include Strawberry Perl in its portable form with my application?
From quick googling, I think it would, but I don't want to risk anything.

Thank you for your help.

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



Now that the CPAN module sealed.pm has stabilized at v7 after a year of solid real world live mod_perl 2 + ithread hosting , I think it's time to step back and ask exactly *why* this feature - first offered to p5p in 2001 by Doug MacEachern, wasn't ever incorporated into the core feature set of the language. For background, see

https://iconoclasts.blog/joe/perl7-sealed-lexicals

Instead of "it" being a technical issue at stake, it seems clear that the reason Doug's patch was rejected was more of a social problem. The Language Design Weenies in the Damian Conway Personality Cult at the time didn't *want* this feature, since only Dylan had it, and Python was never going to get it. So it was rejected outright.

Sadly, that attitude still is pervasive in the upper echelons of the community, but I think the community is better served by breaking out this functionality into a subroutine attribute that only operates on typed lexicals, which otherwise serve no useful purpose.

What do you think? Have you tried sealed.pm out in your codebase yet?

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



As I write, there are currently 641 of them.

https://github.com/topics/hacktoberfest?l=perl

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



Hello everyone! First, let me start off by saying I am no Linux guru and I am definitely no Perl expert, so I apologize if these are dumb questions or if I don't provide enough information... Let me preface this post with a little backstory!

I want to test Request Tracker for my IT team to use. It looks promising and it looks like what we need. That being said, this install has been an absolute nightmare. The guides are very hit and miss, the other walkthroughs that I've been able to google have only been partially accurate... It's been a very frustrating time. I know, most people would have walked away from it at this point, but I'm stubborn and now I'm determined to make it work - even if we don't go forward using it. I HAVE been able to piece together a complete walk through, which is nice, and it gives me the base install. In order to get what I feel like I need to make this work for my environment, I need to have a few of their add-ins installed, and that's where my trouble comes in...

Example - Here is an example of what I'm trying to get installed. Initially, when I ran the perl Makefile.PL command, I got the error listed in the title. After digging for a few days, I was able to find this on another post in the RT forums:

$ sudo apt-get install libgd-dev libgraphviz-dev graphviz autoconf apache2 libapache2-mod-fcgid slapd ldap-utils expat openssl libssl-dev # Install standalone Perl for RT $ wget http://www.cpan.org/src/5.0/perl-5.26.3.tar.gz $ tar -xzf perl-5.26.3.tar.gz $ cd perl-5.26.3 $ sudo ./Configure -des -Dprefix=/opt/perl5 $ sudo make $ sudo make test $ sudo make install # Use new Perl install: $ export PATH=/opt/perl5/bin:$PATH $ which Perl # Install Meta CPAN $ wget https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz $ /opt/perl5/bin/perl Makefile.PL $ make $ make test $ sudo make install # Tell RT to use metacpan $ export RT_FIX_DEPS_CMD='/opt/perl5/bin/cpanm --sudo --notest' # Configure RT $ ./configure --enable-gd --enable-graphviz 

This still gave me the error, and then digging a little more got me this:
# CD into App-cpanminus-1.7044.tar.gz $ cd App-cpanminus-1.7044.tar.gz # Run perl Makefile.PL $ perl Makefile.PL 

So, if I run perl Makefile.PL from /home/username/App-cpanminus-1.7044.tar.gz it works. But if I try to do this from anywhere else, I get the error message listed in the subject. I thought that this:
export PATH=/opt/perl5/bin:$PATH

would resolve that? Or am I mistaken?

I can run the perl Makefile.PL in the above directory, but then to continue the steps for the add-in (Example link from above), when I get to the make initdb command, I get a totally different error:
make: *** No rule to make target \initialize-database’.? Stop.`

Which completely stops me again... which is why I'm hoping if I can get the initial error resolved, the rest of this will work like it should. There are about a dozen add-ins that I'd like to add, but if I can't get past any of this, then it's a moot point. I know I should give up and look for something else, but my company is in the middle of a divestiture, and I need something to help cover my US sites until we are completely integrated into the new parent company.

Thank you in advance for any advice or suggestions!

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



The RequireExplicitInclusion policy will complain about modules that you're using but didn't specifically include. For example:

use Test::More; sub test_something { local $Test::Builder::Level = $Test::Builder::Level + 1; return is( ... ); } 

The policy will complain about you using $Test::Builder::Level without including Test::Builder.

Ideally you could tell the policy that Test::More brings in Test::Builder but until then you can now do this:

[Modules::RequireExplicitInclusion] ignore_modules = Test::Builder 

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


Running a Perl script with -C seems to enable most of the UTF-8 stuff I would want. How do I get the same functionality inside of a Perl script? Perlrun mentions putting it on the shebang line, but that doesn't work above v5.10?

The utf8::all module also seems to do what I want, but it's not a core module. Is there a simple way in core Perl to just say "turn on UTF8 pretty much everywhere"?

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




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]




List of new CPAN distributions – Aug 2024 submitted by /u/perlancar
[link] [comments]


List of new CPAN distributions – Jul 2024 submitted by /u/perlancar
[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 https://zsh.org/mla/workers//1999/msg00153.html

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]



Dancing with Copilot Workspace - Perl Hacks submitted by /u/davorg
[link] [comments]