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
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'...
oz123's user avatar
  • 1,288
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, /...
BarsMonster's user avatar
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 ...
user avatar
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 ...
Jon Topper's user avatar
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 ...
love's user avatar
  • 155
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 , ...
yael's user avatar
  • 2,473
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 ...
Rob Y's user avatar
  • 11
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 ...
stivlo's user avatar
  • 749
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 ...
user avatar
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.
AdrienF's user avatar
  • 125
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 *....
user3400's user avatar
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 ...
Waveter's user avatar
  • 574
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 ...
Malaco's user avatar
  • 13
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-...
Alex Turner's user avatar
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 ...
Konroi's user avatar
  • 21
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 ...
Athiruban's user avatar
  • 176
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: /...
Mara's user avatar
  • 139
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 ...
h00j's user avatar
  • 388
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/...
azec-pdx's user avatar
  • 205
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 ...
Mark J Seger's user avatar
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/...
Tad's user avatar
  • 133
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 ...
Nemekh's user avatar
  • 11
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 ...
Stefan Lasiewski's user avatar
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 ...
Ben's user avatar
  • 3,880
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 ...
Alex R's user avatar
  • 1,083
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 ...
DrStalker's user avatar
  • 7,036
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 ...
lintunen's user avatar
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 ...
Paul's user avatar
  • 3,127
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 ...
BioRod's user avatar
  • 303
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 \ ...
user977828's user avatar
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 ...
datakid's user avatar
  • 359
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" ...
Zek's user avatar
  • 578
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 ...
Todd Iglehart's user avatar
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 ...
Joe's user avatar
  • 1,053
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 ...
Bob Sauvage's user avatar
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 ...
Mark Zakred's user avatar
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 ...
vijay rajah's user avatar
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 ...
yael's user avatar
  • 2,473
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 ...
Cebjyre's user avatar
  • 293
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. ...
Steed's user avatar
  • 19
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 ...
Linker3000's user avatar
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 ...
Arun's user avatar
  • 13
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 ] && ...
Andrew's user avatar
  • 113
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 ...
Kevin's user avatar
  • 847
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?
karmet's user avatar
  • 209
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 ...
Roger's user avatar
  • 165
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 ...
corvidnola's user avatar
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 => '...
Jayen's user avatar
  • 1,877
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 ...
Treat's user avatar
  • 25
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 ...
bnabilos's user avatar
  • 111

1
3 4
5
6 7
12