Blogpost about setting the #openmpl environment from within #perl
Other links:
- Brett Estrade's presentation at TPRC
https://www.youtube.com/watch?v=_pzG5DerDT0
- my companion entry at blogs.perl for https://blogs.perl.org/users/chrisarg/2024/07/parallel-perlc-applications-without-tears-using-openmp-controlling-the-openmp-environment.html
perl #openmp #parallelprogramming
submitted by /u/ReplacementSlight413
[link] [comments]
Intermediate OpenMP for Perl Programmers - Brett Estrade - TPRC 2024
#tprc2024 #perl #raku #openmp This is a sequel to my 2021 talk in Houston, “Introduction to OpenMP for Perl Programmers”. That talk covered the essential ele...YouTube
My job has led me down the rabbit hole of doing some scripting work in Perl, mainly utility tools. The challenge being that these tools need to parse several thousand source files, and doing so would take quite some time.
I initially dabbled in doing very light stuff with a perl -e
one-liner from within a shell script, which meant I could use xargs. However, as my parsing needs evolved on the Perl side of things, I ended up switching to an actual Perl file, which hindered my ability to do parallel processing as our VMs did not have the Perl interpreter built with threads support. In addition, installation of any non-builtin modules such as CPAN was not possible on my target system, so I had limited possibilities, some of which I would assume to be safer and/or less quirky than this.
So then I came up with a rather ugly solution which involved invoking xargs via backticks, which then called a perl one-liner (again) for doing the more computation-heavy parts, xargs splitting the array to process into argument batches for each mini-program to process. It looked like this thus far:
my $out = `echo "$str_in" | xargs -P $num_threads -n $chunk_size perl -e ' my \@args = \@ARGV; foreach my \$arg (\@args) { for my \$idx (1 .. 100000) { my \$var = \$idx; } print "\$arg\n"; } '`;
However, this had some drawbacks:
- No editor syntax highlighting (in my case, VSCode), since the inline program is a string.
- All variables within the inline program had to be escaped so as not to be interpolated themselves, which hindered readability quite a bit.
- Every time you would want to use this technique in different parts of the code, you'd have to copy-paste the entire shell command together with the mini-program, even if that very logic was somewhere else in your code.
After some playing around, I've come to a nifty almost-metaprogramming solution, which isn't perfect still, but fits my needs decently well:
sub processing_fct { my u/args = u/ARGV; foreach my $arg (@args) { for my $idx (1 .. 100000) { my $var = $idx; } print "A very extraordinarily long string that contains $arg words and beyond\n"; } } sub parallel_invoke { use POSIX qw{ceil}; my $src_file = $0; my $fct_name = shift; my $input_arg_array = shift; my $n_threads = shift; my $str_in = join("\n", @{$input_arg_array}); my $chunk_size = ceil(@{$input_arg_array} / $n_threads); open(my $src_fh, "<", $src_file) or die("parallel_invoke(): Unable to open source file"); my $src_content = do { local $/; <$src_fh> }; my $fct_body = ($src_content =~ /sub\s+$fct_name\s*({((?:[^}{]*(?1)?)*+)})/m)[1] or die("Unable to find function $fct_name in source file"); return `echo '$str_in' | xargs -P $n_threads -n $chunk_size perl -e '$fct_body'`; } my $out = parallel_invoke("processing_fct", \@array, $num_threads);
All parallel_invoke() does is open it's own source file, finds the subroutine declaration, and then passes the function body captured by the regex (which isn't too pretty, but it was necessary to reliably match a balanced construct of nested brackets) - to the xargs perl call.
My limited benchmarking has found this to be as fast if not faster than the perl-with-threads equivalent, in addition to circumventing the performance penalty for the thread safety.
I'd be curious to hear of your opinion of such method, or if you've solved a similar issue differently.
submitted by /u/Wynaan
[link] [comments]
submitted by /u/perlancar [link] [comments] |
List of new CPAN distributions – Jun 2024
dist author abstract date Alien-RtAudio JBARRETT Install RtAudio 2024-06-23T15:44:22 Alien-SunVox JBARRETT Install The SunVox Library – Alexander Zolotov's SunVox modular synthesizer and…perlancar's blog
I need some help with the old Perl Gunnar Hjalmarsson's Ringlink program on my site. The forms work, the database gets added to and everything seems ready to go except for the email functions that depend on sendmail.
I have tried several things, installed the CPAN dependencies the program needs, tried Auron SendEmail and other programs and have thoroughly confused myself.
There's a test installation on my site, with the admin and password are both 'test'. There are copies of the CGI files and probably what needs looking at are rlmain.pm, rlconfig.pm and sender.pm
I am running Apache 2.4.54 on Windows 10 with Strawberry Perl installed. I am using the last published version Ringlink (v3.4)
I know this is an old program and the project probably not worth pursuing, but I really would like to give this a go to get it working and would be grateful for any suggestions.
submitted by /u/brisray
[link] [comments]
Auron SendEmail - Auron Software Portable E-mail Freeware
The Auron SendEmail set of portable freeware tools for Windows enable you to send E-mails through from either GUI or commandline.Auron Software
[link] [comments]
(dii) 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
Damian on top form as always. The modules this talk is based on are, of course, all both brilliant and incredibly useful. But the thing that's really impressed me here is the way he has taken some of his modules from a couple of decades ago and replaced them with calls to LLMs. That's food for thought.
submitted by /u/davorg
[link] [comments]
The Once and Future Perl - Damian Conway - TPRC 2024
#tprc24 #perl #rakuRetroemotions, statistical outliers, lunar excursions, Lorentz contraction, extrasolar planets, atomic clocks, lucky bullets, Greek mythol...YouTube
I was lucky enough to attend the perl and raku conference this year and had a great time meeting lots of awesome people. I am primarily a designer by trade but do code as well. At the conference, I explored a number of original depictions of the perl camel for fun and this one was my favorite. The idea was to bring a strikingly modern feel to the Perl Camel. Loose inspiration for this symbol is code llama and p****n. This design exploration felt like my way to hack something during the conference! The idea behind this simple symbol is that it could work nicely at very small sizes while still being visually clear. The font is a free open-source display font called Jaro. the first image was also a concept of placing "Perl" in the camel symbol to strengthen the association between the "perl" and the camel symbol as this may be helpful for new developers. I could spend much more time on this but thought I would share! Love it? Hate it? Let me know what you think (especially if you like it) submitted by /u/North-Clue-2313 |
PSA: to get Net::SSLeay to build on a new M3 MBP I had to do export OPENSSL_PREFIX=/opt/homebrew/opt/openssl/include/openssl/
to get it to build on a new M3 MBP with an OpenSSL that was installed via brew install openssl
Filed an issue at https://github.com/radiator-software/p5-net-ssleay/issues/482
submitted by /u/lovela47
[link] [comments]
Build fails on new M3 MBP due to apparent change to OpenSSL include directory · Issue #482 · radiator-software/p5-net-ssleay
On a new M3 MBP to get Net::SSLeay to build I had to do export OPENSSL_PREFIX=/opt/homebrew/opt/openssl/include/openssl/ to get it to build with an OpenSSL that was installed via brew install opens...GitHub
As the conference is happening in Las Vegas right now, recordings of the talks are being posted to YouTube.
https://www.youtube.com/@YAPCNA
Thanks to everyone planning, sponsoring, speaking and coding in the Perl space. I appreciate you all.
submitted by /u/DeepFriedDinosaur
[link] [comments]
The Perl and Raku Conference - Las Vegas, NV 2024
The official YouTube page of The Perl & Raku Conference, hosted by The Perl Foundation.YouTube
My site got exploited the other week. I had a backup of my WordPress domain, so after importing the backup, most of the infected files were gone. However, some files outside the public_html folder were infected. I deleted those files, and my website loads up fine. Just wondering, is there a way I can restore those files without having my hosting company reinstall Perl?
Thx in advance.
/home2/user1/perl5/lib/perl5/x/index.php: SL-PHP-FILEHACKER-fbo.UNOFFICIAL FOUND
/home2/user1/perl5/lib/x/index.php: SL-PHP-FILEHACKER-fbo.UNOFFICIAL FOUND
/home2/user1/perl5/bin/x/index.php: SL-PHP-FILEHACKER-fbo.UNOFFICIAL FOUND
/home2/user1/perl5/x/index.php: SL-PHP-FILEHACKER-fbo.UNOFFICIAL FOUND
-ABS
submitted by /u/AnotherBrokenSpirit
[link] [comments]
Sorry I didn't get this out here earlier (and it's an xpost from Perlmonks), but Perl Community (parent org of the Science Perl Committee that is initiated the Science Track) is giving out a "peoples choice" award at the end of Conference Lightning Talks. It's sincere gesture from us and allows anyone to vote for anyone in the Perl community at large, as a "thank you" from us.
The Science Track talks have been great, some are even starting to come online. Thanks to everyone who made this happen, especially the TPRC Planning Committee.
submitted by /u/OODLER577
[link] [comments]
The 2024 Golden PERL Award
The Golden PERL Award AKA The People's Choice Award is sponsored by PerlCommunity.org and the Public Enrichment & Robotics Labs. Anyone is eligible to cast a vote and anyone in the global Perl community is eligible to receive a vote.Google Docs
I am using Selenium to obtain a numeric value from a website with code such as:
my @divwrap = $driver->find_elements('whatever', 'id'); my $return_value = $driver->find_child_element($divwrap, 'changeValue', 'class')->get_text();
This works fine, and returns the correct expected value.
If the value is POSITIVE, it return the plus sign, such as "+64.43"
But if the value is NEGATIVE, it returns a "wide Character" string: "" instead of the minus sign.
So the return looks like "64.43"
Interestingly, I cannot do a substitution.
If I have explicit code, such as:
my $output = "64.43" ; $output =~ s/"/\-/ ;
... then $output will print as "-64.43"
... but if I try to do the same substitution on the return from the find_child_element function:
$return_value =~ s/"/\-/ ;
... the substitution does not take... and printing $return_value continues to output "64.43".
Any ideas why it doesn't... and how to solve it?
submitted by /u/AvWxA
[link] [comments]
I’m a dev with 20yoe in mostly Java and js but have various amounts of experience with other languages. I’ve decided that I need Perl in my toolkit because I find it on even the most minimal boxes preinstalled and I can’t always install Java or Js just to do admin things. Typically I use bash for these tasks but I just need a little more ability to abstract than what bash easily provides. What would you all recommend as the place to start? Most guides that I run into assume that I’m a beginner to programming and it feels slow. My normal method of learning a new language is to stumble through building a web server but I’m not sure that the way to go here.
submitted by /u/Jjabrahams567
[link] [comments]
I am working with the IP::Geolocation::MMDB module which replaces the deprecated modules for GeoIP databases.
I am having trouble understanding how to extract data.
my $ip = "8.8.8.8"; my $db = IP::Geolocation::MMDB->new(file => "$geolitecitydb"); my $geodata = $db->record_for_address($ip); print Dumper($geodata);
Using Data::Dumper as above to show the results, I see something like (truncated):
Dumper...........$VAR1 = { 'continent' => { 'geoname_id' => 6255149, 'names' => { 'de' => 'Nordamerika', 'es' => "Norteam\x{e9}rica", 'zh-CN' => "\x{5317}\x{7f8e}\x{6d32}", 'ru' => "\x{421}\x{435}\x{432}\x{435}\x{440}\x{43d}\x{430}\x{44f} \x{410}\x{43c}\x{435}\x{440}\x{438}\x{43a}\x{430}", 'fr' => "Am\x{e9}rique du Nord", 'ja' => "\x{5317}\x{30a2}\x{30e1}\x{30ea}\x{30ab}", 'en' => 'North America', 'pt-BR' => "Am\x{e9}rica do Norte" }, 'code' => 'NA'
Supposing I just want to grab the value of continent=>names=>en portion (value: 'North America') and write it to a value -- how would I do this? I'm having problems understanding the documentation I'm reading to deal with hashes of hashes.
Most examples I can find online involve looping through all of this; but in my case, I just want to make $somevar = 'North America.' I'd like to repeat it for other data as well, which is returned in this hash.
It feels like something like:
$geodata{city=>names=>en} should work, but it doesn't.
submitted by /u/SqualorTrawler
[link] [comments]
I have been using version 5.22.1 for years, and it did what I needed to do. After all these years, I need some additional functionality, so I thought installing the latest might help.
Which is when I found that ActiveState has changed the installation process totally. Anyway, I went through the installation of the "recommended" version, and installation seemed to go fine.
I then ran the following simple code through both versions.
use HTTP::Tiny; my $url ='https://www.scrapingcourse.com/ecommerce/' ; my $response = HTTP::Tiny->new->get($url); print $response->{content};
Version 5.22.1 runs this fine and gives me the HTML of the page.
Version 5.36.3 gives me the following errors;
IO::Socket::SSL 1.42 must be installed for https support
Net::SSLeay 1.49 must be installed for https support
When I use the old ppm command for Version 5.22.1, it gives me a list of 271 packages installed.
When I used the new "state" command: "state packages", it showed nothing.
So I used "state" to "install" IO-Socket-SSL, and Net-SSLeay, and now those are the only two that show up in the "state packages" list.
But it did not change functionality. The error messages are still there, and no execution.
It doesn't complain about HTTP::Tiny.
I tried installing Strawberry. But it had a problem with a more complex part of my original project, so I went back to ActiveState 5.22.1, which works fine.
Anybody got any ideas about what I need to do to get 5.36.3 actually working?
submitted by /u/AvWxA
[link] [comments]
[link] [comments]
(di) 10 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. CGI...niceperl.blogspot.com
[link] [comments]
Bowing to the inevitable - Perl Hacks
Data Munging with Perl was published in February 2001. That was over 23 years ago. It's even 10 years since Manning took the book out of print and the rights to the content reverted to me.Dave Cross (Perl Hacks)
Its been a long time since i've had to hack some code together so here just asking for advice as to where to start.
I have a group of printers (all have same web interface) on the corporate network. I would like to make a simple script that can login, and upload a config file (really its a list of users that have can scan documents, it doesn't matter what).
I've tried to google this with limited results, so wanted to reach out here to see if PERL would be the best answer for this.
I guess my question is, what modules should I look at to connect to a webpage in order to login then access a page behind the login and upload a file?
I looked into Mechanize but I do not believe it can handle javascript. Any advice or test scripts that do something similar would be greatly appreciated.
submitted by /u/hsvodka
[link] [comments]
I’m currently having to modify a library that used Smart::Match extensively since I can no longer turn off the zillions of lines of experimental warnings in recent Perls. For people who are in a similar situation it’s looking like Data::Compare can replace the situations where I was doing ‘@foo ~~ @bar’, and it’s easy enough to write a “does this hash have this key” helper.
Meta complaint: I was already a bit annoyed at the whole smartmatch “oh whoops actually this is now experimental” saga but now that I’m stuck fixing this breakage I’m $annoyed++. Im getting annoyed enough that I may choose an older Perl that was “good enough” and just stop using the new ones
See also: https://www.reddit.com/r/perl/comments/pimwma/how_do_i_stop_smartmatch_is_experimental_at/
submitted by /u/lovela47
[link] [comments]
Hello all I have a .pl CGI program that calls a module with lots of code I'll call it LotsOfCode.pm now I need to update a few subs in it and possibly add a dependency.
The pl file looks like this:
use LotsOfCode;
Lotsofcode->cat();
LotsOfCode->dog();
Lotsofcode->fish();
Now I'd like this to say the same but I need to improve fish and cat. Say LotsOfCode.pm looks like this:
package LotsOfCode
sub fish {}
sub dog {}
sub cat {}
1;
I'd like to
mkdir ./LotsOfiCode
nano LotsOfCode/fish.pm move sub fish{} here
nano LotsOfCode/dog.pm move sub dog {} here
nano LotsOfCode/cat.pm move sub cat {} here
what do I put in the top of these new files in \LotsOfiCode ?
package LotsOfCode::fish;
or
package fish; ?
or
nothing is what I have so far just
sub fish {}
then in LotsOfCode.pm
do I go:
package LotsOfCode
use LotsOfiCode::fish
use LotsOfiCode::dog
use LotsOfiCode::cat
1;
or
do LotsOfCode::fish;
do LotsOfCode::cat;
do LotsOfCode::dog;
Thank you all in advance I get the more than one way to do it idea of Perl but feel like I keep fumbling with mixing old and new code.
submitted by /u/bug_splat
[link] [comments]
submitted by /u/EvanCarroll [link] [comments] |
Why is "!!" considered bad form in Perl?
During a recent job interview process, I submitted some sample Perl code which used the so-called "secret" !! operator. Later, when discussing the code, one of the interviewers asked me why I chos...Stack Overflow
Filed under "Things that one can do, but why?" , here is the repo of using Perl to learn assembly, or rather use Perl to avoid
- having a C driver program
- make files
- multiple files (Inline::ASM allows one to keep Perl and Assembly in the same file
Bonus :
- it is insane how efficient some of the list utilities at List::Util are !
- Seems Github uses file extensions to count lines of code in a language (the repo is considered all Perl
Link https://github.com/chrisarg/perlAssembly
submitted by /u/ReplacementSlight413
[link] [comments]
GitHub - chrisarg/perlAssembly: Examples of using Perl to augment NASM and vice versa
Examples of using Perl to augment NASM and vice versa - chrisarg/perlAssemblyGitHub
Anybody wants to add a Perl implementation to this?
(I'm currently on a train and have to change soon, but if nobody implements I might give it a try later)
submitted by /u/domm_plix
[link] [comments]
[link] [comments]
(d) 11 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
Enhancing non-Perl bioinformatic applications with #Perl: Building novel, component based applications using Object Orientation, PDL, Alien, FFI, Inline and OpenMP - Archive ouverte HAL https://hal.science/hal-04606172v1
Preprint for the #TPRC2024 talk to be delivered in 10days
submitted by /u/ReplacementSlight413
[link] [comments]
Enhancing non-Perl bioinformatic applications with Perl: Building novel, component based applications using Object Orientation, PDL, Alien, FFI, Inline and OpenMP
Component-Based Software Engineering (CBSE) is a methodology that assembles pre-existing, reusable software components into new applications, which is particularly relevant for fast moving, dataintensive fields such as bioinformatics.Christos Argyropoulos
This might be Perl/docker-perl#161 but if I filed this in the wrong place, let me know. Keeping these things current is the sort of thing I'd pay for.
Pulling perl images locally give the same warnings for old perl versions, although my local docker will still run them:
$ docker pull perl:5.14 5.14: Pulling from library/perl Image docker.io/library/perl:5.14 uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
Here's what I'm getting today from GitHub Actions. Sure, I see all sort of warnings to upgrade node, but nothing about this change:
/usr/bin/docker pull perl:5.14 5.14: Pulling from library/perl [DEPRECATION NOTICE] Docker Image Format v1 and Docker Image manifest version 2, schema 1 support is disabled by default and will be removed in an upcoming release. Suggest the author of docker.io/library/perl:5.14 to upgrade the image to the OCI Format or Docker Image manifest v2, schema 2. More information at https://docs.docker.com/go/deprecated-image-specs/ Warning: Docker pull failed with exit code 1, back off 5.148 seconds before retry. /usr/bin/docker pull perl:5.14 5.14: Pulling from library/perl [DEPRECATION NOTICE] Docker Image Format v1 and Docker Image manifest version 2, schema 1 support is disabled by default and will be removed in an upcoming release. Suggest the author of docker.io/library/perl:5.14 to upgrade the image to the OCI Format or Docker Image manifest v2, schema 2. More information at https://docs.docker.com/go/deprecated-image-specs/ Warning: Docker pull failed with exit code 1, back off 4.06 seconds before retry. /usr/bin/docker pull perl:5.14 5.14: Pulling from library/perl [DEPRECATION NOTICE] Docker Image Format v1 and Docker Image manifest version 2, schema 1 support is disabled by default and will be removed in an upcoming release. Suggest the author of docker.io/library/perl:5.14 to upgrade the image to the OCI Format or Docker Image manifest v2, schema 2. More information at https://docs.docker.com/go/deprecated-image-specs/ Error: Docker pull failed with exit code 1
From this snippet in my GitHub workflows (e.g. .github/workflows/linux.yml)
matrix: os: - ubuntu-22.04 perl-version: - '5.8' - '5.10' - '5.12' - '5.14' - '5.16' - '5.18' - '5.20' - '5.22' - '5.24' - '5.26' - '5.28' - '5.30' - '5.32' - '5.34' - '5.36' - 'latest' container: image: perl:${{ matrix.perl-version }}
submitted by /u/briandfoy
[link] [comments]
GitHub Actions says "upgrade the image to the OCI Format or Docker Image manifest v2, schema 2." · Issue #161 · Perl/docker-perl
Today I started seeing this, which means that all of my Perl testing is borked (thanks for the heads up GitHub). I think you are the source I'm pulling from, but if I'm not, do you know where I sho...GitHub
I have an input string that has "comments" in it that are in the form of: everything after a ;
is considered a comment. I want to remove all comments from the string and get the raw text out. This is a pretty simple regexp replace except for the fact that ;
characters are valid non-comments inside of double quoted strings.
How can I improve the remove_comments()
function to handle quoted strings with semi-colons in them correctly?
```perl use v5.36;
my $str = 'Raw data ; This is a full-line comment More data ; comment after it Some data "and a quoted string; this is NOT a comment"';
my $clean = remove_comments($str);
print "Before:\n$str\n\nAfter:\n$clean\n";
sub remove_comments { my $in = shift();
$in =~ s/;.*//g; # Remove everything after the ; to EOL return $in;
} ```
submitted by /u/scottchiefbaker
[link] [comments]
Hi,
im looking to put my website written in perl that currently runs locally inside apache out on the internet.
I dont want to host myself, and i dont have lots of spare time to config or money to spend for a vps.
Does anyone have experiences and can recommend a webhoster for maybe 10-15 bucks a month where i can just get a simple interface with ssh, where i can put an index.cgi somewhere(dont care if its in cgi-bin or public_html or something else,
i want something where i can just checkout my git repo thta contains index.cgi in its root and just works.
Thank you in advance!
submitted by /u/throwawaybambo
[link] [comments]
Thanks to a pile of new data added and old data cleaned up (most of that work done by Philippe Bruhat and Aristotle Pagaltzis) and some help from Copilot on the Javascript, there's a lot of new, interesting information on my Perl Steering Council web page - https://psc.perlhacks.com/
submitted by /u/davorg
[link] [comments]
[link] [comments]
(cdxcix) 11 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. Ali...niceperl.blogspot.com
I know it is something of an obscure corner of everything that Perl can do, but Perl is excellent for "one-liners".
Has anyone developed a module of convenience functions for use with one-liners? I have something in progress but I'd like to see if there is established prior art.
submitted by /u/singe
[link] [comments]
Stack:
Nginx FCGI CGI::Fast HTML::Template::Compiled Redis CentOS Linux 7.9 spawn-fcgi
I have a Perl application that runs on the above stack.
On process init it does a lot of loading of big hashes and other data into global variables that are mostly preloaded and cached in a distributed Redis install.
To start the application spawn-fcgi creates 6-8 processes on a port nginx then connects to trhough their fcgi module.
The challenge:
— The init process is computing and time consuming; and doing that concurrently six times peaks CPU and overall leads to a ~20-25 second delay before the next web request can be served. And the initial request to each of the six processes has that delay.
I tried loading the content in question directly from Redis on demand but the performance keeping it in memory is naturally much better (minus the initial delay).
is there an architectural pattern that I am not considering here? I am thinking of things as eg. only spinning up one process, having it initialize and then clone(?) it a few times for serving more requests.
I could also think of a way where only 1 process is spawned at a time and once it completes initiation the next one starts; would need to verify that spawn-fcgi can support this.
So my question to this community is if I am missing an obvious better solution than what is in place right now / what I am considering.
Thanks in advance.
submitted by /u/kosaromepr
[link] [comments]
I am moving a pile of stuff off of an older Intel Mac Mini onto an M2. Have almost everything migrated, but am stuck on getting a Perl script that relies heavily on DBD::mysql to work. I finally got cpan to build the module, but when I try to use it in actual code, I get: dyld[82852]: missing symbol called. I go through this mess periodically with OS upgrades...and it's possible that this is (once again) OSX ignoring the module because it's not signed. But the given error sounds more like Perl not finding the dynamic library(s) the module was built with...if I just have a script containing "use DBD::mysql;", that doesn't throw an error, which suggests Perl found the module and loaded it. But chokes when it tries to use it.
I'd be fine with building this module with static libraries, if the process of doing so is easy. But have not seen an easy option to cpan to go that route. Suggestions?
submitted by /u/rlmalisz
[link] [comments]
my $result = $some_value / scalar(split(",", $some_array[0]));
submitted by /u/secreag
[link] [comments]
ar_foo
and $bar
come from a text file.This throws an illegal divide by zero error:
my @ar_foo = ("1", "2", "3"); my $bar = "5"; my $x = $bar / scalar(@ar_foo);
submitted by /u/secreag
[link] [comments]
Struggling to find what people write perl code on.
submitted by /u/SquareRaspberry3808
[link] [comments]
This is the frame body I was using:
our $frame_body = $mw->Frame(-background => $color_theme_bg, -foreground => $color_theme_fg)->pack(-side => 'top');
And I have many widgets like labels, dropdowns, buttons, etc... within that frame like below:
$frame_body ->Label( -text => "@_", -font => $arial_font, -foreground => $color_theme_fg, -background => $color_theme_bg, -highlightthickness => 0, -takefocus => 0, -relief => "flat", -justify => 'center', )-> grid( -column => $mw_col_ctr, -row => $mw_row_ctr, -sticky => "nsew", );
May someone help me the best way to apply a "vertical scroll bar" on the right side of this frame?
Its also nice if automatically adjust incase I manually resize the window. 😀
submitted by /u/DemosaiDelacroix
[link] [comments]
[link] [comments]
(cdxcviii) 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. CPA...niceperl.blogspot.com
Is there a way to replace accented characters by their plain version, something like
tr/ûšḥ/ush/?
submitted by /u/Patentsmatter
[link] [comments]
submitted by /u/perlancar [link] [comments] |
List of new CPAN distributions – May 2024
dist author abstract date Alien-NLopt DJERIUS Build and Install the NLopt library 2024-05-01T05:00:12 Alien-cue PLICEASE Find or download the cue configuration language tool 2024-05-07T11:34:32 Ali…perlancar's blog
submitted by /u/saiftynet [link] [comments] |
GitHub - saiftynet/Calendar
Contribute to saiftynet/Calendar development by creating an account on GitHub.GitHub
Is it possible to display an image to the user, without loading all the trappings of a whole widget / event-loop environment like Prima, Tk, Wx, Win32::GUI, etc?
Specifically, I want something simple that I can execute in a BEGIN block to display a splash image to the user while the rest of the application is compiled and initializes, which takes about 5-10 seconds. The program in question is a perl Wx application running under MS Windows.
submitted by /u/sue_d_nymme
[link] [comments]
I am making a script with multiple threads, and one of the threads I wish to make is a "cpu usage monitoring thread" that checks both "overall" cpu usage and the "current script cpu usage" or external PID cpu usage.
Then I can decide if any of my threads need to sleep for the moment while CPU is recovering from something (like maybe its executing something heavy) then my perl script needs to adjust.
I wish it will also be EFFICIENT and ACCURATE as much as possible. I don't want the perl script have high CPU usage. Cross Platform would be nice, but if a Windows Solution is more efficient. Please share.
For now I can't find any good solution. 🙁
submitted by /u/DemosaiDelacroix
[link] [comments]
Hey, I have a chance at getting an interview for a position through a connection (internship), and the position I was referred to said the job would mainly focus on PERL, how could I get ready for this interview? On my resume, I want to add a small portion where I say I'm developing my PERL skills. I saw some basic tutorials for making simple calculators and whatnot. What could I do to get ready and impress my interviewers? Also, should I add these simple projects like a calculator on my Git Hub just to show I have at least a little experience? If not, what other projects could I work on to develop my skills with PERL, I'd love any advice I could get, thanks!
Some background: I've only done Python and Java through my university and did a bit of webdev in my free time.
submitted by /u/SquareRaspberry3808
[link] [comments]
Vim highlights subs with a signature params as red/orange to alert you it's incorrect. Now that Perl actually supports signatures and this is no longer a syntax error I need to find a way to disable this. This is really a Vim question, but I'm sure some other Perl nerd out there has run into this before me.
Has anyone figured out how to disable this "warning" in Vim?
submitted by /u/scottchiefbaker
[link] [comments]