Questions tagged [perl]

Perl is a powerful, high level programming language. Questions about Perl should be limited to the Perl development environment, running Perl, or using Perl to automate tasks on your computer.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

OpenSSL Timestamp log location

I am trying to debug an openssl ts based perl http server. The server logs display an openssl ts -reply command failing with exit code 1. Where can I see the logs related to this openssl command, or ...
0
votes
0answers
31 views

Given a large set of IDs, how would one extract information from another tab-separated file both ID-related and closely related data

The ID file is formatted thus: A0A1H3TMV2 Z8X0S9 A0A2M6TTB8 A0A2Q5TOM7 A0A1U4MIN3 X9RTW0 The tab-separated file has the following format: Query ID Neighbor ID A0A1H3TMV2 A0A1H3TMX3 ...
2
votes
1answer
26 views

Keep only the second and third words of each line in notepad++

I want to... keep the second... and third words only... I would like to keep only the second and third words and delete everything else in each line i.e want and to, the and second, third and words ...
2
votes
0answers
52 views

Python and Perl not recognized in cmd even after adding in environment

It was fine yesterday, but it suddenly stopped working today. Both my perl and python were not recognized in cmd. I read as much as i can online for the answers and follow the instruction. I have ...
4
votes
1answer
263 views

Add a new element to existing JSON array

How can I add "arn:aws:iam::xxxxxxx:role/3" line below "arn:aws:iam::xxxxxxx:role/2" adding a comma after "arn:aws:iam::xxxxxxx:role/2",. Before: { "Version": "2012-10-17", "Statement": [ { ...
0
votes
0answers
40 views

Is it possible to add any command in /etc/profile.d at the runtime?

I want some command to run as soon as system boots up. So I have created a simple script and kept it in /etc/profile.d/. After this command I have placed shutdown command. Now on some condition i do ...
1
vote
1answer
41 views

Can I get this Perl command on Windows to not generate dates with apostrophes in LibreOffice?

Based on the help I got on this question, I have this Perl command that I run in Windows 10 PowerShell: ls |% { $_.Name } | perl -pe 's/(.)(.*)_(\d{4})(\d{2})(\d{2})_(\d+).jpg/\u$1$2,$3-$4-$5,$6,$&...
0
votes
1answer
37 views

How to add prefix from row at the beginning few next lines in Notepad++?

I would like to use a line as a prefix for a few more lines. For an example, please consider the situation where I have these lines: hostname-junek-1 ;ge-1/0/1 ;ge-1/0/2 ;ge-1/0/5 ;ge-1/1/27 ;ge-1/1/...
0
votes
1answer
21 views

removing BerkeleyDB rows using Perl

I have no experience with Perl or BerkelyDB. I have a huge BerleleyDB with a list of email and a unix timestamp. I need help to remove email with older timestamp , older than 100 days . I have this ...
0
votes
1answer
22 views

perl script cannot find modules because of permission problems

I have a perl script that runs when I run it as superuser and it does not run when I am a normal user. I installed Perl from sources and typed make install as superuser. I guess this created a perl ...
0
votes
0answers
89 views

How to connect with Strawberry Perl 5.30 to MySQL 8 via caching_sha2_password (Windows)?

I've installed Strawberry Perl 5.30 and MySQL 8.0.0.18 (Windows, 64-bit) and when I try to connect I get this error: DBI connect('database=abc;host=127.0.0.1;port=3306;','MyUser',...) failed: ...
1
vote
1answer
89 views

replace sub-string with last special character, being (3rd part) of comma separated string

I have a string with comma separated values, like: 742108,SOME-STRING_A_-BLAHBLAH_1-4MP0RTTYE,SOME-STRING_A_-BLAHBLAH_1-4MP0-,,, As you can see, the 3rd comma separated value has sometimes special ...
1
vote
1answer
56 views

awk + print lines only if second field match hours:min:sec

log file is like this 34.3.23.58 07:20:01 AM all 0.02 0.00 0.02 0.00 0.00 99.97 34.3.23.58 07:30:01 AM all 0.02 ...
0
votes
0answers
165 views

perl: warning: Setting locale failed. Centos 6.9

I am receiving the following error message on my Centos linux server for past 15 days. perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "...
0
votes
0answers
41 views

Can't open perl script on mounted drive in WSL Ubuntu 18.04

So I have an NFS remote directory that I need to access and run a perl script off of. Since WSL does not support NFS currently, I first mounted it within my Windows 10 host and assigned it a drive ...
0
votes
0answers
28 views

Missing Perl Path after installation

After the installation of perl5.28.0 I added it to $PATH using: export PATH="/Users/_myUserName/perl5/perlbrew/perls/perl-5.28.0/bin/perl:$PATH" Then I called a .sh script which used GIT, that's ...
1
vote
2answers
35 views

How to globally replace programming code using literal input files?

I will use HTML as an example. But it could be any programming code for any language. This comes up often enough, it would be useful to deal with the literal text code to search and replace. This is ...
1
vote
0answers
747 views

Perl install module fail on WIN10

I was trying to install Spreadsheet::WriteExcel module via CPAN tool for Aactive Perl(5.28.1 version). However , when I executed command "cpan install Spreadsheet::WriteExcel" , it showed some error ...
1
vote
4answers
161 views

What are the ways to replace a fixed string (not regex) as a whole word in command line on Linux?

What are the ways to replace a fixed string (not regex) as a whole word in command line on Linux? For example I would like to replace literal "b.*c" as a whole word, with literal "\t", without ...
0
votes
0answers
70 views

Perl @INC can't find module when installing cpanm

When I run this command do install cpanminus: curl -L https://cpanmin.us | perl - --sudo App::cpanminus I get this output: % Total % Received % Xferd Average Speed Time Time Time ...
0
votes
1answer
52 views

Unable to access config'd custom xmp namespace in exiftool

Though some form of me just not really getting it, I am unable to write this custom XMP namespace I've made in my config file. Below is the file. %Image::Exiftool::UserDefined = ( 'Image::ExifTool::...
-1
votes
1answer
109 views

How to create %hash which will be contains key => name of file, value => file contents?

For exemple, I have 1 file 8854 File contest is: ABCSDESG
1
vote
0answers
57 views

XML::Parser Perl module is not installed

Installation was successful and went well in my droplet (using DigitalOcean) but when I view the page that requires XML::Parser I still got this error message: Internal Server Error XML::Parser Perl ...
1
vote
1answer
167 views

How to set environment variables for DOSBox with telnetbbs

I'm looking for the exact way to implement the SDL environment variable from a perl script that is the front end for launching a dosbox BBS. I have the right approach from this link: running-dosbox-...
1
vote
1answer
54 views

Is there a download option for the documentation and tutorials at https://perldoc.perl.org/5.30.0? (Windows user)

I want the documentation and probably the tutorials saved locally on my computer, as usually I only have a 64 kbit/s internet connection. I'm working on Windows 10. At perlfaq1.html#AUTHOR-AND-...
0
votes
0answers
39 views

Perl script using Google API, how to resolve 401 Unauthorized: Invalid Credentials at /usr/local/share/perl5/Google/API/Method.pm line 93

After a power shutdown on our Linux systems, we are getting the following error from the Perl script which is using Google API tools to create G Suite accounts. Script: makenewgmailaccount($g,$...
0
votes
0answers
51 views

Installing PDL on Strawberry Perl running on Windows 10 fails

I'm trying to install PDL on a Strawberry Perl (5.28, 32bit) running on my Windows 10 machine. I tried cpanm --notest PDL and cpanm --notest --force PDL but - after lots of processing - I keep ...
1
vote
1answer
50 views

How can I use :perldo in vim on Windows?

I installed Git Bash and vim was pre-installed. I personally would rather use PCREs instead of vim's regular expressions, so I tried doing :perldo /s/foo/bar. The error was that it could not find msys-...
0
votes
1answer
54 views

Named capture groups from command line

I've come up with the following regular expression: \[release(\s+(?<release_type>.*))?\]\n+(?<release_notes>.*) The idea is to parse a commit message for several params: [release minor] ...
0
votes
2answers
59 views

Perl script doesn't execute properly in crontab or shell script

I have a Perl script (that came with my Vicidial dialer software) that runs perfectly in the Linux command line. It sends an email at the end of the script. The script doesn't create any errors and ...
0
votes
1answer
79 views

cron returning json.pm error Cent OS 7

I am running Cent OS 7 and trying to invoke a perl script to update Over the Air TV Guide data to XML for my Plex media server. The problem is that Cron doesn't run the script. If I run the script ...
0
votes
0answers
63 views

install perl Math::GSL

Trying to install Math::GSL $ cpanm Math::GSL --force --> Working on Math::GSL Fetching http://www.cpan.org/authors/id/L/LE/LETO/Math-GSL-0.40.tar.gz ... OK ==> Found dependencies: Alien::GSL --...
0
votes
2answers
1k views

Can't locate Switch.pm even when installed

A colleage recently tried updating some code via conda and in the process broke our installation of bioperl. When trying to run one of our normal inhouse scripts I now get the following error: (...
0
votes
1answer
146 views

Can I use a pseudo terminal (PTY) to automate SSH & sudo on CentOS Linux?

Here's the situation: I frequently build new AWS hosts using terraform. After the initial build, there are several interactive steps that need to be performed on the hosts involving sudo. Would it be ...
0
votes
1answer
50 views

Can I simplify and negate this? ^(//|//\s+|\s+//|\s+//\s+)

Basically I want to match commented lines like: // foobar (this is a commented line) but I want to make sure I catch this line even if there is white space either side of the comment signature '//' ...
1
vote
1answer
537 views

How to set file association for all users (Windows Server)

We run our jobs through SSMS on Windows Server. Our IT support has built a new server for us, virtual, with Windows Server 2016 Datacenter and SSMS 15.0, and copied over all jobs from the current ...
0
votes
0answers
115 views

When I install Perl 5.30.0 from source, perl -v still displays 5.26.2 is being used

I'm using Linux, and wanted to install the latest version of Perl, as according to the perl -v command, I had version 5.26.2, and the latest (stable) release is 5.30.0. But when I compiled the source,...
0
votes
0answers
96 views

Net::ARP failing to install on strawberry perl

I am trying to install the Net::ARP package on my windows 10 machine. To install the package I opened the cpan shell and ran install Net::ARP. Unfortunately this command fails and returns this error: ...
1
vote
1answer
64 views

Sed / awk / perl text editing on n lines after match

I'm strugling with this. I'm trying to edit the next 6 lines after a match, by adding text before each lines, and double quotes before and after the existing number on each lines. What my file look ...
0
votes
0answers
65 views

Missing site_perl and vendor_perl in bash shell

Whenever I use the terminal in Manjaro KDE, I get a message: bash: /bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl: No such file or directory ...
0
votes
1answer
49 views

perlbrew switch claims version is not installed

I'm trying to downgrade my version of perl to 5.18.2 using perlbrew. The installation terminates successfully (logs here and here), I can run the binary, it is listed as installed and when I try to ...
0
votes
1answer
119 views

Bugzilla gives Internal Server Error after Ubuntu and Perl upgrade

I've just upgraded a server running a Bugzilla installation from Ubuntu 14.04 to 16.04 (this also comes with a Perl 5.18 to 5.22 upgrade). Bugzilla is configured as a virtual host in Apache. After ...
0
votes
0answers
51 views

Use relative path in .plist made with Platypus

I want to adapt an application bundle created with Platypus (MyApp) to use a Perl binary contained in the .app itself. I can set the Perl interpreter the .app should use modifying the AppSettings....
1
vote
1answer
31 views

print the number in second col the number of times in a new line always as specified in col 1

how do I print the value in col 2 as many times as it is specified in col 1. 10 -11 9 -10 7 -9 7 -8 7 -7 12 -6 362 -1 271 1 94 2 41 3 17 4 13 5 16 6 5 7 expected output: -11 -11 -11 -11 -11 -11 -11 ...
1
vote
1answer
94 views

mac os X mojave Perl 5 XML::DOM::XPath test_non_ascii fail

I am trying to install Bio::Root::Version in my MacOsX Mojave, it requires XML::DOM::XPath but when I try to install it with: cpan XML::DOM::XPath it fail with: ------------------- t/test_non_ascii....
0
votes
1answer
84 views

How to script remote monitoring and management

Looking at this video on scripting: https://www.youtube.com/watch?v=LcERIxWDQXA how or where is this executed? What I'm not understanding is how to use the SWIS (SolarWinds Information Service) ...
0
votes
0answers
111 views

Perl regex for currency matching

I am trying to error check the format of a string $price The string will start with a Currency symbol. (As there are so many of them, I'm going to skip that, so show that below as ?) So the CORRECT ...
1
vote
1answer
169 views

error: git-submodule died of signal 11

FML edit: So..... long story short, it was a function I had in my bashrc profile... test() { npm run test $1 $2 $3 $4 ;}; export -f test But! How did I track this down, you might ask? Well, after ...
0
votes
1answer
312 views

“/usr/bin/perl: bad interpreter: No such file or directory” on Debian. How can I restore or reconfigure perl?

Short Question: It seems that I have problems with perl, which makes me unable to run the dpkg-reconfigure command. How to recover the /usr/bin/perl file? Some Background I have had some problems ...
0
votes
2answers
515 views

Extract text between keywords in a file using perl

How can i extract text between keywords? The text is saved in a txt or json file. The input is this. "Adapt to the environment and project challenges\nAbility to manage issues, communications and ...

1
2 3 4 5
10