Questions tagged [perl]

Perl is a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for many system management tasks. The CPAN is Perl's module repository and is where users should turn first for code that implements solutions to already-solved problems.

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

Empty response of nginx with ngx_http_perl_module

I have to run a very simplistic piece of perl code in response to HTTP request. The nginx config is: http { perl_modules perl/lib; perl_require errors.pm; server { listen ...
0
votes
0answers
33 views

Best way to secure world-writable .shtml files written to by Perl?

The Perl script I have a Perl script running on an old Debian 6 server (until I move to a new server) that opens an editable pane in an .shtml file, accepts only Creole markup input from a single ...
0
votes
1answer
21 views

How to separate variables using awk and append it to Text file using ansible

What I got as extra variable to ansible playbook is "CHOW_app/timmy_app1/johnn_app3/harper_app4/mona_app5". This is passed as single variable to the playbook. I have to separate it and save it in a ...
0
votes
1answer
97 views

Webmin shows plain Perl script when try to open login page

when I try to open webmin login page "https://192.168.1.13:10000" it shows plain Perl script like below, what is problem? I'm running Ubuntu 18.04 and latest version of webmin. #!/usr/bin/perl # # ...
0
votes
1answer
25 views

Apache: No custom headers in environment variables

I've just installed a new webserver (Debian Buster, Apache, Dovecot, ISPConfig) to replace an old webserver. One of my websites uses custom request headers (through Javascript) to pass information to ...
0
votes
0answers
23 views

Solved: Yum install of perl engages in circular logic

Edit: I'm an idiot and forgot to use createrepo and update the repodata, so the dependencies were not found on the repo. Mystery solved. Bit of an odd one. I'm attempting to install perl on a Redhat ...
0
votes
0answers
67 views

SuexcUserGroup owner and group “suexec policy violation” after server update

I run a server with Apache 2.2.3 (was 2.0.55) that carries perl scripts for users (all 755) in: /home/username/webapps/cgi-bin/ their VirtualHost block contains: SuexecUserGroup username groupname (...
1
vote
1answer
58 views

apache error “no macro defined before Use”

REVISED I inherited this apache server from a Perl shop that I now work. When this web server was on ubuntu 14.04, I had no issues starting apache. I upgraded the server to ubuntu 18.04 and now ...
-1
votes
1answer
36 views

Using Net::SMTP::TLS with Amazon's Simple Email Service

I have been using Net::SMTP::TLS for my web application to send password reset emails using Google email for years. my $smtp = Net::SMTP::TLS->new(email-smtp.us-east-1.amazonaws.com, ...
0
votes
0answers
23 views

Is it possible to save TCDUMP (pt-query-digest) report at database?

I want to save all the information that I get from a tcpdump command in terminal and save it on database, more easy to search and find what I want. I run this command first. tcpdump -i any port ...
0
votes
0answers
30 views

Installing Unicode::Map8 on Perl 5.26 failing

I've set up a new server, and I'm in the process of setting up all the Perl modules I need. One of them is failing for some reason: cpanm Unicode::Map8 I get: cpanm (App::cpanminus) 1.7044 on perl ...
0
votes
1answer
25 views

Perl - SSH and run backup while retain the session

Hope someone can help me here. Looking to redo my bash ssh script for cisco devices, and add on to it. Basically, my idea is to have an SSH to log me to the device in enable mode (so i can do regular ...
2
votes
0answers
244 views

Apache 2.4 not calling Perl FastCGI Authenticator script

My company is currently trying implement a new Perl FastCGI based login script to work with Apache 2.4's mod_fcgid module. Our old one relied on mod_perl to do the bridge between Apache's basic ...
3
votes
1answer
60 views

Force all Perl scripts to run with `use strict`

I just went through a large legacy Perl web application (built using cgi-lib.pl and running as CGI with Apache HTTPD) and updated every script to use strict;, fixing a lot of small bugs along the way. ...
0
votes
1answer
201 views

Can't locate object method “object_file” via package

When i am installing Params:Validate on my linux server i am getting below error Can't locate object method "object_file" via package "ExtUtils::CBuilder" at /usr/lib/perl5/5.10.0/Module/Build/Base.pm ...
0
votes
0answers
33 views

Perl script slower on other server compared to dev (with same spec)

I'm trying to figure out why a Perl script I have, isn't performing anywhere near as well once I put it on the live server. The whole script is identical on both servers (one is a test server, the ...
2
votes
1answer
598 views

error while installing perl-Moose on red hat linux

I am seeing the errors below while installing perl-moose using command yum install perl-Moose Can someone please help me with commands on how to install these dependencies? Thanks in advance Error: ...
0
votes
0answers
139 views

DBI connect('orthomcl:mysql_local_infile=1','root',…) failed

I have cat orthomcl/Dockerfile: FROM debian:stretch-backports RUN apt-get update && apt-get install -y --no-install-recommends \ wget \ cpanminus \ build-essential \ ...
1
vote
1answer
442 views

docker-compose up caused orthomcl_orthomcl_1 exited with code 0

I have cat orthomcl/Dockerfile: FROM debian:stretch-backports RUN apt-get update && apt-get install -y --no-install-recommends \ wget \ cpanminus \ build-essential \ ...
1
vote
0answers
295 views

Apache 2.4.29: cgi scripts load as text, even though cgi is enabled and .conf set up

I spent a few days searching for answers on serverfault and elsewhere, and tried them all to no avail. I'm trying to serve dynamic content using perl cgi scripts (Apache 2.4.29 on Ubuntu 18.04.2). The ...
0
votes
1answer
47 views

Regex group printing in bash

I want to use egrep on log file where it would only output me matched groups. I've got in log file this: queued as 6B6A72A7896 sent 00100000000000000 0 2019 Apr 7 00:37:39 using PCRE ...
0
votes
1answer
112 views

How to reinstall/fix specific perl module on ubuntu 16.04

During an update, apt and dkpg returned the following error: dpkg: error processing package libperl5.22:amd64 (--configure): package is in a very bad inconsistent state; you should reinstall it ...
2
votes
1answer
47 views

Binaries generated by perl's PAR::Packer break when packaged in RPM

I have a perl script that I want to be usable on systems with no perl interpreter installed (like a linux container, for example). I generate a binary with PAR::Packer and everything appears to work ...
0
votes
1answer
346 views

Upgrade OTRS 6.0 - /opt/otrs/bin/c CPU usage

OTRS 6.0 - /opt/otrs/bin/c CPU usage Hi everyone, On OTRS 6.0, the /opt/otrs/bin/c processus use 100% when login to otrs/index.pl : 3104 apache 20 0 441496 79904 6308 R 100.0 0.2 0:06....
0
votes
0answers
14 views

Running processes: “perl /tmp/dd” - what is this? [duplicate]

I have a LAMP server with about 50 virtual domains, and am using Webmin/Virtualmin to manage the server. When looking at running processes (top) I see one domain's username is running a couple of ...
2
votes
1answer
404 views

WWW::Mechanize Perl module won't install on server

I'm trying to work out why a Perl module won't install on my server. cpanm WWW::Mechanize It processes stuff for ages, and then eventually dies with: root@admin:~# cpanm WWW::Mechanize --> ...
2
votes
1answer
57 views

Checking the validity of Resource Records in DNS Zones

I am using perl to do some DNS manipulation tasks. I am using NSD as my DNS server. I want to figure out what the best way is to check whether the names of all Resource Records in a DNS zone file ...
2
votes
1answer
329 views

Systemd service file for assp

I'm running ASSP on CentOS 7 which uses systemd. The only pre-made service file I could find (howtoforge.com) uses oneshot type which I'm not sure is right. More importantly, the stop command seems ...
1
vote
1answer
83 views

How to distribure sudoers files with REX Configuration Management

When trying to push a sudoers file to other machines, the rexcm task/command gets stuck. The Problem is (so it seems to me), that the sudoers file is owned by the rex-user when writing and "other" ...
1
vote
1answer
108 views

How to backup a file before changing it with “REX Configuration management” (rexify)

How do I backup files when making a change with rex cm (rexify.org) - or do I have to do this manually? I see no option in the File.pm API - description. I hope there is some undocumented feature. ...
0
votes
1answer
408 views

Connection Error with TCP sockets between a Windows 2012 R2 and Linux Centos7

I have a connection problem with TCP sockets between a Windows 2012 R2 machine and Linux CentOS7. When I run a perl client that sends several messages from Linux to a Windows perl service, it allways ...
1
vote
0answers
126 views

Apache mod_ext_filter and mod_proxy

I have a problem using apache mod_ext_filter and mod_proxy. I wrote a per script (add-promo.pl) in order to add some tags to HTML page. My problem is that Apache don't run this script. I have ...
0
votes
0answers
1k views

Perl cgi script displayed as plain text instead of executing

After reading and trying suggestions from: here and here, I am still unable to get apache to execute the perl script. I am on macOS High Sierra and running brew apache. The script works fine if I ...
1
vote
1answer
384 views

pg_upgradecluster fails with “Error: could not get cluster locales”

I'm trying to upgrade postgres cluster from 9.5 to 10 Steps I did: installed postgresql-10 and postgresql-client-10 removed new default 10 main cluster used command "pg_upgradecluster 9.5 main" ...
0
votes
1answer
58 views

different permissions running script from web browser or www-data user

I want a perl to write to my server's file system but I have a problem. It fails when checking permissions (with -w). I reduced the issue to its simplest expression : #!/usr/bin/perl print "Content-...
0
votes
1answer
170 views

Bash Script to Rebuild Nginx w/ Custom Modules

I'm trying to write a script that will build Nginx from sources with custom modules... I'd like to do it in a clean manner that doesn't require updating version numbers after a new release. What I've ...
-1
votes
1answer
757 views

SMTP error 554 5.7.1 and 221 2.7.0

I have a dedicated server that connects to a webhosting to send a mails using SMTP protocol, but I get 554 5.7.1 and 221 2.7.0 errors and e-mail won't send. Full SMTP log is below. This is a script ...
0
votes
1answer
282 views

Perl can't find Multicast.pm [duplicate]

[root@newserver Socket]# /root/scripts/filetest testfile.txt Can't locate loadable object for module IO::Socket::Multicast in @INC (@INC contains: /usr/local/lib64/perl5/IO/Socket /usr/local/lib64/...
0
votes
1answer
319 views

How to parse an ldif export for attribute values

I have an ldif export where I want to build an outputfile with one line per ldif entry; the one line contains various attribute-values in a specific order. So the commands should parse each ldif ...
0
votes
1answer
73 views

nph script corrupted in browser with apache2 v 2.4

I'm trying to figure out why an nph- script in Perl is corrupting from the browser. This is the code: #!/usr/bin/perl print "Content-Type: text/plain\n\n"; print "FOO"; I name it nph-test.cgi, and ...
0
votes
0answers
175 views

Nginx is not serving Perl files

I am running Nginx server on Debian 9. My problem is that, Nginx is serving Perl files in root directory, but it is not serving in alias directory (I get 403 Forbidden). This is my configuration of ...
2
votes
1answer
224 views

Multi-line PCRE w\ lookhead, count matches

I am trying to perform a regex that matches if both the word cat AND dog are in the regex with multi-line support matches cat asdjfaldsfj dog #### does NOT match cat adfasdf8989 #### matches dog ...
2
votes
1answer
229 views

Custom prompt using Net::Appliance::Session

I am trying to ssh into a Cisco switch using the Perl module Net::Appliance::Session but I am running into an issue due to the nature of the expected prompt. The switch prompt is the following ...
2
votes
1answer
474 views

AWStats not showing anymore Referrers / Keywords /keyphrases

Me and my colleagues are struggling to find a solution over a strange problem with AWStats. Some months ago, we moved a production environment from a CentOS to an Ubuntu 14.04. Since then, the ...
0
votes
0answers
132 views

PATH_INFO missing on nginx + apache2 proxy pass setup

I'm trying to work out why $ENV{PATH_INFO} is empty in a Perl script on my new server. This is my nginx configuration: location ~ \.cgi$ { try_files $uri =404; gzip off; ...
0
votes
2answers
422 views

How to insert a complex line between two single quotes in sed?

I have this line in the file /var/lib/pgsql/data/postgresql.conf: # archive_command = '' # command to use to archive a logfile segment we need to uncomment the archive_command parameter, ...
2
votes
1answer
2k views

Installing XML::Parser, but it dies due to Expat dependency

I'm trying to install XML::Parser, but for some reason it's failing: cpanm (App::cpanminus) 1.7040 on perl 5.022001 built for x86_64-linux-gnu-thread-multi Work directory is /root/.cpanm/work/...
0
votes
2answers
413 views

Piping exim email to Perl script

I've been trying to pipe an incoming email to a perl script so that I can monitor potential issues with invoices being emailed, and am not having much luck. Working on Red Hat Linux 2.6.32-696-6.3.el6....
0
votes
1answer
488 views

Argument list too long with grep

Normally to search and replace a string in a selection of files, I would find with: grep -rl 'pattern' . This works fine unless you have a LOT of matches. Anyway, I was looking around and found a ...
0
votes
1answer
26 views

command line perl to not clobber symbol links

I want to edit the original files with perl, when I have a numeric sequence of aliases. The task is to use perl on the command line, e.g. perl -pe 's/apples/oranges/' But to edit files in place: ...

1
2 3 4 5
12