Skip to main content



I have inherited some perl scripts that I've generally been able to edit well enough with my knowledge from other languages, but I need to make a change that has me stumped.

The user wants the output that happens from this loop to be reversed.

for ($nn=0;$nn<=$range_max;$nn++) { my $range=sprintf("%02d",$nn); $sum_of_A += $A_EACH_RANGE{"$range"}; $sum_of_B += $B_EACH_RANGE{"$range"}; printf("\"\",\"%s\",\"%s\",\"%s\",\"%s\",\"%s\"\n", $scale[$nn], commify($A_EACH_RANGE{"$range"}), commify($B_EACH_RANGE{"$range"}), commify($sum_of_A), commify($sum_of_B)); } 

So I figured all I had to do was start the for loop at the end like this:
for ($nn=$range_max;$nn>=0;$nn--) { 

Then I realized there's some cumulative math going on in the loop, which means the sum of everything needs to be at the top now instead of the bottom.

Now I'm stuck, I've made a few attempts like pushing it into an array so I could have the option to output in forward or reverse, but all my attempts just hang with no warnings or errors.

I figure there's a more elegant solution but my Google-fu hasn't helped.

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




Randal Schwartz is guest on Flosss Weekly 765, mostly for Dart, but he also talks quite a bit about Perl.

One of the interesting management of Dart is that they have people assigned to work shifts to triage and respond to issues so that requestors can get immediate feedback that at least someone saw their issue. I'll let him tell the rest of the story, but it's a good one.

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




Hi,

I am using Template::Mustache in a prooted Debian in termux on Android.

It works fine, however it produces this annoying warning:

"Flock not available: 'Function not implemented': continuing in unsafe mode".

As far as I can see it ultimately comes from Path::Tiny when slurping a file.

I have tried to get rid of it with "no warnings" but that did not do the trick.

So how can I suppress this warning?

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



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


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


Webservice to connect to Onfido API

Changes for 0.006 - 2023-07-02T15:36:03+00:00

  • Add hook



Open a file for shared reading and/or writing

Changes for 4.05 - 2023-07-02

  • Fix tests with perl-5.38.0.


Fast, safe DBI connection and transaction management

Changes for 0.59

  • Fix for Windows t/load.t failures



Validation-Class-7.900059


Powerful Data Validation Framework

Changes for 7.900059
  • Change: 8e4779d9d7127d11626058d1809df691b91dd35a Author: Christiaan Kras <c.kras@pcc-online.net> Date : 2023-03-27 22:16:38 +0000
  • Change: 7efcee6e33044b40a4d83c4423b01a7eda6fba38 Author: Christiaan Kras <c.kras@pcc-online.net> Date : 2023-03-27 21:26:57 +0000
  • Change: 261609a9971e6fcc12722c59cf12d8fb2f733503 Author: Christiaan Kras <c.kras@pcc-online.net> Date : 2023-03-27 20:57:24 +0000

https://metacpan.org/dist/Validation-Class


Syntax-Kamelon-0.22


A versatile and fully programmable textual content parser that is extremely well suited for syntax highlighting and code folding
https://metacpan.org/dist/Syntax-Kamelon



Net-MQTT-Simple-One_Shot_Loader-0.03


Perl package to add one_shot method to Net::MQTT::Simple

Changes for 0.03 - 2023-03-27
  • Updated package to hide package Net::MQTT::Simple from CPAN indexer
  • Updated tests to pass when IO::Socket::SSL is unavailable - Fixed #1 GitHub
  • Updated tests to added method can tests for response object

https://metacpan.org/dist/Net-MQTT-Simple-One_Shot_Loader
#1