Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
76 views

This curl command works fine (must be accessed in tls 1.3): curl -v --tlsv1.3 -u "xxxx":"xxx" -X POST "https:xxxxxxx" Try to get the same result with Perl. Created a ...
Denis.A's user avatar
  • 299
Best practices
0 votes
4 replies
49 views

I get a "Prototype mismatch" warning in code that either imports 'blessed' from Scalar::Util or defines it depending on the version of Scalar::Util. Is there a way to suppress the warning, ...
FreonPSandoz's user avatar
2 votes
2 answers
87 views

I have a regular expression in an extension of java by florian ingerl to parse a latex command, \\\\DocumentMetadata(?<docMetadata>\\{(?:[^{}]|(?'docMetadata'))*\\}) but the important thing is ...
user2609605's user avatar
-2 votes
0 answers
67 views

I am trying to read (and possibly write to) a spreadsheet in perl . Google told me to try spreadsheeet::read. cpan told me it didn't exist. as in Could not expand [spreadsheet::read]. Check the module ...
Jim Harle's user avatar
1 vote
0 answers
121 views

Seeking community wisdom on why the ApacheBench utility consistently returns a lot of "Non-2xx responses" ( 502 Bad Gateway ) when running a benchmark test of my helloworld web app using ...
santa100's user avatar
  • 273
-3 votes
2 answers
212 views

I have filenames with this pattern [a-zA-Z0-9]{10} and .txt extension. They might also contain a pattern like this [super] and it could be either before or after [a-zA-Z0-9]{10} with '_' separating ...
user1850133's user avatar
  • 3,057
0 votes
2 answers
137 views

In some perl code I'm evaluating $v1 $op $v2 to make sure the result is valid and the program does not abort. However when $op eq '/' and $v2 == 0 I noticed that a user-defined die handler is called (...
U. Windl's user avatar
  • 4,758
-5 votes
1 answer
101 views

I want to create an asynchronuous OpenAPI interface. Async jobs return a 202 and a location header to query later. This is my OpenAPI document: --- components: headers: JobLocation: ...
Marc0's user avatar
  • 23
Tooling
3 votes
5 replies
120 views

I am trying to implement a Mojolicious application that (also) acts as a proxy in front or rclone serve. To that purpose I am trying to get Mojolicious to act as a proxy, and request from rclone serve ...
simone's user avatar
  • 5,262
Advice
2 votes
7 replies
185 views

Long story short I have written my own custom HTML template system that I am very happy with. However I have done that with manually concatenating HTML tags, and it is a bit messy. There has to be a ...
James B's user avatar
  • 53
3 votes
2 answers
220 views

According to the new source::encoding pragma's documentation, use source::encoding 'ascii' is automatically enabled within the lexical scope of a use v5.41.0 or higher. To me, this means that use v5....
ikegami's user avatar
  • 391k
7 votes
1 answer
141 views

I'm running into a weird import error message while trying to create a commandline tool that references packages within a Perl web application. The web application itself is working fine. I can ...
DylanStreb's user avatar
2 votes
2 answers
111 views

When using the perl library Storable to store and retrieve XML::LibXML document objects, I get a segmentation fault. Specifically, once I use the LibXML routine findnodes. My question is: why, and is ...
cms's user avatar
  • 277
5 votes
2 answers
140 views

I know how to get all of the values of a hash given a set of keys: use strict; use warnings; use DDP; my %h = ( a => 1, b => 2 ); my @v = @h{a,b}; p @v; # ( 1, 2 ) However I'm not sure ...
Rawley Fowler's user avatar
4 votes
2 answers
141 views

I have a minimal working example of two nested while loops on the same array @g: #!/usr/bin/env perl use 5.042; no source::encoding; use warnings FATAL => 'all'; use feature 'say'; use autodie ':...
con's user avatar
  • 6,227
2 votes
2 answers
163 views

If there's a hash where one of the values is an array, what's the shortest way to split into an array-of-hashes (AoH) for each array value that keeps all the hash keys and values, except for replacing ...
Richlv's user avatar
  • 4,255
2 votes
2 answers
128 views

How can I substitute every character that is: not WORD (a-z, A-Z, 0-9) and also not minus (-) and also not hash (#) to underline (_) e.g. "aB-09 !#" => "aB-09__#" &...
chris01's user avatar
  • 12.7k
1 vote
0 answers
91 views

This package of the Perl Data Language https://metacpan.org/pod/PDL::Minuit When I run only the parameter definition part of the example program: use PDL::LiteF; use PDL::Minuit; mn_init(\&$chi2, {...
Enredanrestos's user avatar
2 votes
3 answers
181 views

Let's say I want to replace every occurrence of 12345 in file1 with the contents of file2. The following code works: use strict; use warnings; local $/; open my $fh, 'file1' or die "$!"; ...
Ivan's user avatar
  • 419
2 votes
1 answer
145 views

I would like the following code to round-trip properly on Perl ≥5.36. ❯ perl -MCpanel::JSON::XS=decode_json,encode_json -Mbuiltin=false,true -MDevel::Peek=Dump -E' say Cpanel::JSON::XS->VERSION;...
daxim's user avatar
  • 39.3k
1 vote
4 answers
251 views

To avoid some confusion and questions, I changed the new string to "letters", so it would not match "text", so to avoid infinite loops. I work under Windows, with the perl provided ...
virolino's user avatar
  • 2,331
3 votes
1 answer
104 views

While writing a new Perl module which was capable of using AnyEvent, my benchmarking tests showed that it was slowing down dramatically over time. Turning off AnyEvent cured the problem, which ...
TFBW's user avatar
  • 1,259
2 votes
3 answers
150 views

Related to Properly simulate "pattern" attribute with javascript: How do I set an input pattern using JavaScript? when I try element.pattern = 'a\S' (as a trivial example), then the pattern ...
U. Windl's user avatar
  • 4,758
-2 votes
1 answer
176 views

My task was to port debian12 to debian13. In debian13 I noticed that the website was behaving differently with Perl v5.40.1. I found out that the following line returns different values on different ...
Namal's user avatar
  • 289
-2 votes
2 answers
105 views

In a CGI script that processes arrays of strings the user can supply for each field whether to match a string there or not. If all user-specified criteria are fulfilled, the specific array should be ...
U. Windl's user avatar
  • 4,758
2 votes
1 answer
87 views

I'm defining some tests for a library I'm using. One of my tests is calling the code in such a way that it produces warnings, which is expected. However, I'd ideally like to suppress these warnings ...
plentyofcoffee's user avatar
0 votes
1 answer
123 views

In my quest to get to know Nix and NixOS better, I'm going to try moving a small utility I have onto my NixOS server. There are two components to this utility: A Perl script, which requires both (a) ...
kqr's user avatar
  • 15.1k
2 votes
2 answers
189 views

I want to know whether the input contains any non-space as in \S. However, the input may contain ANSI VT escape sequences (Wikipedia) for text color and style, which do match \S (even the ESC code ...
Lumi's user avatar
  • 15.5k
2 votes
2 answers
180 views

I've just come across such usage of Perl constants: use strict; use warnings; use constant PI => 4 * atan2(1, 1); print("The value of PI is: ${\PI}\n"); # The value of PI is: 3....
Eugene Yarmash's user avatar
5 votes
6 answers
523 views

I'm looking for a Perl regex that matches two or more consecutive dots unless there are three dots. These strings should match: Yes.. Please go away. I have the ball.. In this case....I vote yes. ...
ericgbirder's user avatar
1 vote
1 answer
70 views

I am creating a Bug on Bugzilla 5.2+ via rest-API. I try to achieve to set the reporter to a known Bugzilla user which differs from the used API-User. I already tried that by creating an Extension.pm ...
MSauer's user avatar
  • 168
-1 votes
2 answers
153 views

since Snowflake is switching to MFA, I need to change some perl code to use access tokens. Just doing something simple like this: my $username = ''; my $pwd =''; my $dbh = DBI->connect($dsn, ...
llamaface's user avatar
2 votes
1 answer
153 views

Consider the following Perl script: #!/usr/bin/perl foreach(split '$$', 'A$$B'){ print; } print "\n"; foreach(split '\$\$', 'A$$B'){ print; } print "\n"; Given the well-known ...
Math Rules's user avatar
-2 votes
3 answers
127 views

Original data contains 4 times repeated characters, seperated by a space. For example, code2 1 1 1 1 7 7 7 7 10 10 10 10 eq code9 a a a a tpp1 tpp1 tpp1 tpp1 es I'd like to add suffix to pairs using ...
S Lee's user avatar
  • 27
-1 votes
1 answer
68 views

The following code creates a menu list called "User Selection" with four menu items: "Save", "Save As", "Load, and "Load From": my $userselectedmenuitems = ...
Nathan Goedeke's user avatar
-2 votes
4 answers
188 views

I have a problem I don't understand: Given a string consisting of multiple lines like this: DB<5> x $token 0 'ACCOUNT_CHANGED = "20250728081545Z" ACCOUNT_CHANGED_T = "...
U. Windl's user avatar
  • 4,758
0 votes
2 answers
183 views

The DBI docs on prepare() state that it's behaviour differ for various drivers: Drivers for engines without the concept of preparing a statement will typically just store the statement in the ...
planetp's user avatar
  • 16.6k
0 votes
2 answers
132 views

This line works fine under linux : PGPASSWORD=***** psql --username=**** -h ***** -d **** -p **** -P pager=off -t --csv -c "select \"Nom\", \"Path\" from \"vVMware-Vms\&...
Denis.A's user avatar
  • 299
2 votes
2 answers
161 views

I'm trying to read a json file which contains Vietnamese text. I tried using decode_json with in-file string and it works well. use strict; use warnings; use JSON; binmode(STDOUT, ":encoding(...
minhnn's user avatar
  • 29
0 votes
1 answer
146 views

I found some old code that does this: while(<IN>) { chomp; split; if ($_[0] eq "junk") { ... } The code works presuming pre-5.12 split in void context behavior: $ /depot/perl-...
stevesliva's user avatar
  • 5,716
-1 votes
1 answer
83 views

I am having problems running commands using IPC::run with special characters, in my current case ' and * The used commands: apt-get -y --allow-unauthenticated -o Dpkg::lock::timeout=0 install /tmp/...
user31061291's user avatar
-4 votes
2 answers
149 views

I am trying to get par-packer running under Cygwin and having problems with Perl version mismatch. After installing and trying to run, I get this error: bin > pp -o ehive_decode.exe myscript.pl ...
neilw's user avatar
  • 485
-2 votes
2 answers
123 views

The manual page for the Perl gvmodule (graphviz) states: New edges Add new edge between existing nodes edge_handle gv::edge (tail_node_handle, head_node_handle); ...
U. Windl's user avatar
  • 4,758
1 vote
4 answers
231 views

When using alternation with captures, I've often been somewhat puzzled by how it actually works, in particular why I would often get void (undef) match entries which I then have to discard by ...
Lumi's user avatar
  • 15.5k
4 votes
1 answer
117 views

I wrote some program for Perl 5.26.1, using strict and warnings. So after some tests without a message I thought it's OK. But when I ran the program wth older Perl 5.18.2, I suddenly got a warning ...
U. Windl's user avatar
  • 4,758
0 votes
2 answers
131 views

A have a question similar to Perl: Testing that a file is actually writable as opposed to checking file permissions: In a program I have an option to specify a required output file, and I want to ...
U. Windl's user avatar
  • 4,758
4 votes
1 answer
259 views

I thought I'd try using mmap to search a multi-gigabyte file without running out of memory. I tested on a file that did actually fit and the File::Slurp version took less than a minute but the File::...
jhnc's user avatar
  • 18.7k
2 votes
2 answers
102 views

my $modifiers = 'i'; my $string = "abcabc\n"; $string =~ s/(?$modifiers)B/Z/; print $string; $modifiers = 'g'; $string =~ s/(?$modifiers)a/q/; print $string; The first regex works and ...
Steve Waring's user avatar
  • 3,289
-6 votes
2 answers
250 views

How can I join string content in Perl? my $string = $q->param("us1"); # this is what entered +book +dog +cat print join(',', $string), "\n"; This is the output I want: "+...
mike joe's user avatar
3 votes
3 answers
158 views

I'm trying to extract the tabular data from apache pyspark logs using a perl one-liner. Below is the sample file log and there are 3 tabular output from the spark output: 24/06/19 01:00:00 INFO org....
stack0114106's user avatar
  • 8,893

1
2 3 4 5
1367