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.
598
questions
1
vote
2
answers
781
views
Is PERL a must on LFS? [closed]
I am building LFS, and I am wondering about building PERL. Call me narrow minded, but I really want to try going on a Linux system without PERL, and have everything implemented in Python.
Since I don'...
1
vote
4
answers
986
views
How to force Perl use /bin/ksh instead of /bin/sh?
I am migrating from AIX to Solaris 10, but the version of /bin/sh there is so old, that our scripts does not work. Can I somehow force perl to execute commands in `` via different shell (in my case, /...
1
vote
5
answers
1k
views
Writing a Linux Service
I would like to write a Linux service using PERL, but don't know how to do. (I know perl)
I have a MySQL database, and need to check it for new records, so I can process them. The service should ...
1
vote
2
answers
698
views
VMWare perl toolkit download
I seem to be finding it far harder than is reasonable to find a recent copy of the VIPerl Toolkit to download. There's a copy on sourceforge, but that's marked as beta and dated 2007. There are ...
1
vote
1
answer
631
views
Email gets heavily delayed in Bugzilla
In my bugzilla (hosted in Ubuntu 12.04), emails are geting delayed upto 24hrs and sometimes even more than that. I have also installed Jobqueue.pl as well.
But whenever i am checking the jobqueue ...
1
vote
1
answer
1k
views
perl + sed + remove lines that start with "#"
please advice
I have linux and solaris machines, and I need command that work on both OS
I use the following perl line in order to remove all lines that start with "#"
why perl command not work ,
...
1
vote
1
answer
155
views
Using "at" to call a delayed process from within a cgi script
Here is a puzzle I hope you can help me with. A client wants to send a welcome letter exactly 47 minutes after a document is uploaded via cgi script.
I wrote a routine to send the letter, and then I ...
1
vote
2
answers
670
views
How to install Perl Power Tools on Windows
Are the Perl Power Tools still around? I'm trying to install them on Windows Server 2008 with Strawberry Perl. If I search the web I get:
http://sourceforge.net/projects/ppt/
as first link, where I ...
1
vote
3
answers
1k
views
Perl: How to sync files with ftp server
I'm looking for a way to sync a local folder with a remote folder that is only accessible with FTP.
Is this possible in Perl or is it possible by calling a System-command in Perl ?
I'm in a Windows ...
1
vote
1
answer
1k
views
query 2003 dhcp leases
Can I query my windows 2003 dhcp server from my windows xp in order to get the ip address if i have the mac address or otherwise.
1
vote
4
answers
789
views
Perl 5.10 logon/logout scripts
Given a mixed environment of Windows servers, Linux (RHEL5) servers, and XP clients, can anyone foresee benefits and/or problems attempting to use Perl 5.10 for logon/logout scripts?
Thanks.
Using *....
1
vote
1
answer
2k
views
Cannot run perl script with sudo
I have a perl script (test.pl). If I run this cript by command perl test.pl, it work as normal. However, when I run command sudo perl test.pl, the error below occurs:
Can't locate Log/Log4perl.pm ...
1
vote
1
answer
781
views
Linux "iostat" to .csv file using Perl
I am experimenting with the iostat -c 1 command, and I was wondering if there is a simple way of reading the current output and then separating the values so that I could generate a .csv file.
The ...
1
vote
1
answer
53
views
FC14 and yum dependancies
I've got my hands on an FC14 machine and I've been trying to get yum working on it over the past couple of days. The machine (which is an appliance) shipped with a conflicting package to fedora-...
1
vote
2
answers
1k
views
Making a user account dedicated to a single script in centos
I am trying to make a SSH login for someone on my box. But when they login I want it to auto load a perl script and for them ONLY to be aloud to see / use that perl script.
I only know how to use ...
1
vote
2
answers
5k
views
Perl File::Copy module installation fails
I have Perl version version 5.10.1 installed in my CentOS6.0 machine.
I need to install TWiki and it needs some perl modules (see this URL)
http://twiki.org/cgi-bin/view/TWiki/TWikiInstallationGuide
I ...
1
vote
2
answers
3k
views
Can't install Perl DBD module on Ubuntu (for Bugzilla)
Trying to install bugzilla-4.2.2 on Ubuntu 12.04. When I run checksetup.pl I get the following error:
YOU MUST RUN ONE OF THE FOLLOWING COMMANDS (depending on which database
you use):
PostgreSQL: /...
1
vote
1
answer
7k
views
Config Server Firewall: You need to install the missing perl modules and then install cxs
I am trying to install config server firewall however when i follow the tutorial and run install.sh i get the following error. Can anyone help?
root@localhost:~/csf# sh install.sh
Configuring for OS
...
1
vote
2
answers
5k
views
What's wrong with this installation of Net::SSH2 Perl module?
I am trying to install Net:SSH2 Perl module, but I run in this error:
[root@script-server fmzbih_cms_weather_updater]# cpanm Net::SSH2
--> Working on Net::SSH2
Fetching http://www.cpan.org/authors/...
1
vote
2
answers
3k
views
How to tell is apache is configured to use perl?
I've spent enough time looking around for answers to this with google and I give up. Plenty of discussions about how to build apache with perl support but I want to find out how to tell if the apache ...
1
vote
3
answers
1k
views
How to use Apache Piped Logs to regex replace out unwanted data in logs in real time?
I have https_acces_log log files being generated by Apache that a certain web app is logging unwanted data into the file. I can't stop the app from logging the data, so I'd like to write a perl/...
1
vote
2
answers
340
views
Script output differing from output when command is run manually [closed]
I'm fairly new to things and I've been writing a simple Perl script to poll a server for iostat -k -x data every few seconds using capture from Capture::Tiny
The script works, however the data being ...
1
vote
1
answer
1k
views
Perl, Solaris: CPAN module install failed. How can I find out why?
I'm trying to install the File::Tail module using CPAN an older Solaris 10 (SunOS 5.10) box.
I get an error when trying to install the module, but I see no indication why this failed anywhere in the ...
1
vote
2
answers
5k
views
How to apt-get perl module "Template"
I'm installing Bugzilla and thus I"m working through a list of perl modules to install. I've managed to get a lot of them up and running except for the below Template module. Is there a apt-get ...
1
vote
4
answers
5k
views
How to resolve these errors and install ClamAV for Perl under Ubuntu/Debian?
After successful
apt-get install clamav
I then did:
perl -MCPAN -e shell
install File::Scan::ClamAV
and got
CPAN.pm: Going to build J/JA/JAMTUR/File-Scan-ClamAV-1.91.tar.gz
Cannot find clamd ...
1
vote
2
answers
420
views
Using a regular expression (perl?) on a MySQL DB
I have a MYSQL DB and I need to do some text manipulation on one of the fields. This is a one-off, not an ongoing process.
The built in MySQL text manipulation functions will be a nightmare to do ...
1
vote
2
answers
408
views
HTML pages getting 'cut off' CGI/Perl
I noticed a problem with web pages getting 'cut off' with a Perl/CGI based proprietary application I administer on a server running Apache 2.2. This lead me to investigate the problem further by ...
1
vote
1
answer
3k
views
SpamAssassin local.cf DMARC configuration recognizes reject and none, but not quarantine
For SpamAssassin 3.4.2 I've added the below configuration ruleset to local.cf with the intent of providing a spam score for failed DMARC tests.
The DMARC and SPF Authentication-Results headers are ...
1
vote
1
answer
581
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
vote
1
answer
590
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
1
answer
373
views
What PERL env vars need to be set for a local install?
I'm running Centos 7.2, which has Perl 5.16 by default.
Some software one of my users has requested requires at least Perl 5.18, with a preference for 5.22. I've installed 5.24 in /opt/perl/5.24 ...
1
vote
3
answers
1k
views
How execute perl one-liner from perl script (properly escaped)
I have a perl script from within which I need to execute a simple perl one-liner on a remote host:
ssh 192.168.1.1 "perl -pi.bup -e 's/^(\s+?kernel)(.*)(?<!audit=1)$/$1$2 audit=1/' /etc/grub.conf"
...
1
vote
2
answers
368
views
Why perl backticks don't see anything past the first space?
I have a command
$output = `somecommand parm1 parm2`;
When I try to run this perl script I get.
Can't exec "somecommand" at .....
It seems it is not seeing anything past the first space in ...
1
vote
1
answer
643
views
How to customize munin alert message text
So, I use munin to monitor a couple hundred servers and I love it. I am trying to tweak the alert text to look a little different however, and I'm not understanding how to get it to do what I want.
I ...
1
vote
4
answers
27k
views
RedHat - Can't install a Perl module (CPAN)
I'm not able to install a perl module:
[root@xxx]# cpan Module::Find
[...]
CPAN: File::Temp loaded ok (v0.22)
CPAN.pm: Going to build C/CR/CRENZ/Module-Find-0.12.tar.gz
Checking if your kit is ...
1
vote
3
answers
1k
views
Proper acting when a process is consuming 100% time of CPU
On several machines I have a problem with a process that is using 100% time of a CPU.
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 85740 100.0 0.2 34668 ...
1
vote
1
answer
204
views
Self compiled Perl package Centos [duplicate]
I have a Centos 6 server.. I have compiled Perl 5.16 in it (in a non-standard location).
Now when I try to install Some package which is dependent on Perl using yum..
Yum tries to install Perl ...
1
vote
1
answer
2k
views
Linux + exit status from Perl one-liner code
I use Perl one-liners in my ksh scripts.
Sometimes it's necessary to get an exit status from the Perl one-liner in order to verify if the Perl one-liner succeeded or not.
For example, I need to ...
1
vote
1
answer
915
views
Is it possible to dry-run install a CPAN bundle?
I'm migrating from one server to another and using perl -MCPAN -eautobundle to work out which modules I should be bringing along.
Some modules are a bit problematic at install-time though (mainly due ...
1
vote
1
answer
1k
views
Centos 6.3 PERL CGI selinux file read access
I have a CGI script called index.cgi
It is trying to read a log file called 10.128.0.242.2012.sep.20.downloaded.txt under the path /var/log/trafcount/
It appears that it is being blocked by selinux. ...
1
vote
1
answer
2k
views
Nagios plugin script not working as expected
I have modified an off-the-shelf Nagios plugin perl script to (in theory) return a one or zero according to the existence, or not, of a file on a remote linux server. The script runs a remote ssh ...
1
vote
1
answer
8k
views
How to grep string in perl [closed]
How to grep the string in perl.
Variable sessionWeb contains a web page html code. I want to grep "active Sessions" from this and want to print as below. For example the line in the web page will be
...
1
vote
1
answer
653
views
Perl sendmail attach log files match date format
I want to send log files matching date format, e.g. YYYY-MM-DD-*.log as attachments in Perl script. In BASH, this can be easily done by:
[ -f $DIR/explog/$(date "+%Y-%m-%d")-*-host1.log ] && ...
1
vote
2
answers
4k
views
Perl script and out of memory errors
We have a midsized server with 48GB of RAM and are attempting to import a list of around 100,000 opt-in email subscribers to a new list management system written in Perl. From my understanding, Perl ...
1
vote
1
answer
1k
views
perl process causing high server load, how to find what its doing
I've got a Debian webhosting machine with cpu loads around 11. Using top I see that perl is using 99% of the cpu as user www-data. How can I find out more about what perl is actually doing?
1
vote
2
answers
417
views
Run Perl Script on Apache2/Redhat5.5
I am working with an Apache2/Redhat5.5 configuration. I am trying to configure (and learn) how to run Perl scripts which is new to me.
In my httpd.conf file I made these changes and/or notice these ...
1
vote
1
answer
4k
views
suexec policy violation: What were these guys up to?
Have just assumed responsibility for a new client's site. OS is Linux. They had a cgi-bin directory below document root.
I was looking at my error.log for an issue with a script and found a number ...
1
vote
3
answers
2k
views
LDAP + TLS - different behaviour on two machines
machines:
debian wheezy
suse 11
commands:
ldapsearch -ZZ -h ad.unsw.edu.au -x
perl -we "use Net::LDAP; print Net::LDAP->new ('ad.unsw.edu.au')->start_tls(verify => 'require', capath => '...
1
vote
2
answers
283
views
File move in Perl that stops the current script?
how can I do this mv ($file $new_file/$1) or die("Errors 2");
so it would stop the script in terminal if the file is not found?
otherwise it keeps repeating and repeating and I need to restart putty ...
1
vote
2
answers
225
views
Prevent users from listing Apache server accounts
I'm managing an Apache Server (Centos 5.6 + cPanel) and I found a code that lists all user accounts hosted in the server.
I want to know if there is something that I should change in the Apache ...