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 ...

learn more… | top users | synonyms

1
vote
2answers
48 views

Perl regex expression

I have the following string produced by a server log file. I am using Simple Event Correlator (which uses perl regex) to manipulate lines: 18:37:31 643.65.123.123 []sent ...
0
votes
1answer
207 views

Remove text between delimiters in linux [duplicate]

Server got hacked and a fair amount of files were edited. We noticed that the code that was inserted were typically done between delimiters (e.g. /*e21234*/ blah blah /*/e21234*/). What is the most ...
1
vote
1answer
154 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
votes
2answers
516 views

linux/solaris insert date & time at the beginning of each line in file

I want to add date & time at the begging of each line in some file I used sed in order to add the date & time before each line in file please advice what I need to update in my sed in order ...
0
votes
1answer
148 views

Install PAR packer in solaris 11

Installing par packer in solaris 11 is throwing following error. i had used perlgcc but didnt help Has anyone faced the similar issue? How can i install it successfully # perlgcc Makefile.PL # make ...
1
vote
2answers
486 views

BugZilla: Adding PerlConfigRequire to apache2 conf generates errors when restarting service

I've been following the BugZilla installation documentation and using mod_perl w/ apache2. Everything has gone fairly smooth and bugzilla pages appear to be getting rendered and served correctly, but ...
-3
votes
2answers
82 views

perl one liners + add empty line after the last line [closed]

please advice what need to change in the perl syntax in order to add new empty line after the last line? example IP_INFO=12.23.2.1 echo IP= | perl -pe "s/$/$IP_INFO/" 1>>file . ...
1
vote
3answers
211 views

find files with non-zero size in shell

I need to get a list of names of files with non-zero size inside a directory. This should be in a shell script, so bash (or a Perl one-liner) would be ideal.
0
votes
1answer
280 views

grep to IP address when IP address in parameter

I need to grep to IP address ( as the following example ) , I use ksh script , # ifconfig -a | /usr/xpg4/bin/grep "100\.106\.2\.120 " inet 100.106.2.120 netmask ffffff00 broadcast ...
0
votes
2answers
485 views

Is it possible to include/use directly perl's Nagios::Plugin without installing it? [closed]

I am a web developer needing to monitor a vast array of servers with nagios and have to write some perl scripts for it. Looking into it I found Nagios::Plugin package from CPAN, but the servers don't ...
0
votes
1answer
49 views

MySQL creds accepted from CLI but not from Perl DBI [closed]

I have a remote MySQL server. I can log in from the client machine using: mysql -h 172.16.0.7 -u mysqlUser -p and it connects fine. When I use a simple DBH connection in Perl, with same ...
0
votes
1answer
382 views

Perl script which returns multiple exit codes

I have a Perl script that executes another Perl script inside it: #!/usr/bin/perl use strict; use warnings; use Getopt::Long qw(:config no_ignore_case bundling_override); no warnings 'uninitialized'; ...
0
votes
0answers
253 views

Strawberry perl 5 .6.21 cannot locate swtich.pm when i run perl scripts via perl commandline

im trying to run a pulledpork.pl script in conjunction with snort. The pulledpork.pl script can work i believe, but for some reasons. strawberry perl cannot locate switch.pm and thus is aborting ...
1
vote
1answer
234 views

perl app on apache and cgi behaves terribly with 504 gateway timeouts

Note: This question is about my server configuration giving 504 timeouts. I made a project here http://www.tryperl.com/ (requires auth with GitHub to sign in). Please be kind, I'm working on to learn ...
0
votes
1answer
545 views

Troubles monitoring a zimbra installation with nagios

I am trying to monitor my legacy zimbra installation (running on an outdated Ubuntu 8.x) from my nagios install (running on a more recent OpenBSD). The problem is that when I run check_nrpe from the ...
0
votes
1answer
129 views

narrowing why server post from perl web app fails on ec2

Update: I corrected the below permission issue and I can read the log files dancer generates. There was a small code bug, fixed. So now the logs display nothing, but my POST request still just fails ...
0
votes
1answer
153 views

grep + match value only if value in the end of line

please advice what is wrong with my code, ( I run this code on both OS linux and solaris ) I don't get the line from: "file ended with .tmp" example: I need to verify if $FILE ended with .tmp ...
-1
votes
2answers
113 views

All Details of a Running Process [duplicate]

Possible Duplicate: How do I deal with a compromised server? This process is running on my Linux server and is sending spam (connecting to port 25 and port 80 with random IP's). top - ...
1
vote
2answers
186 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 ...
7
votes
3answers
273 views

Creating a script to install a Perl application and its dependencies automatically

I have a Perl application that needs a lot of dependencies that i need to deploy on numerous servers I would like to make a script that installs that Perl application automatically and quickly. To ...
0
votes
1answer
419 views

deploying perl dancer on apache with a virtual host

Forgive my lack of knowledge I'm just learning linux administration here. A week ago I read this article about setting up virtual hosts, I then installed and setup mod_perl and my perl Catalyst ...
-2
votes
1answer
124 views

linux + count how many digits in IP address [closed]

I write the following syntax (exist in my ksh script) in order to find how many digits I have in IP address IP_address=127.1.1.1 echo $IP_address | sed s'/\./ /g' | wc | awk '{print $2}' 4 . ...
1
vote
0answers
61 views

Dedicated TMP and AMAVIS

I perfectly configured my server and now I made 2 stupid mistakes, I updated perl along with it's dependencies and I made a dedicated TMP dir and included it in fstab to prevent code execution with a ...
2
votes
2answers
232 views

Runing perl Script using root cron told me “access denied”

This comes from here Now it runs, but when i run it using the root crontab, it told me: *tail: /var/log/backupeitor.log: file truncated /bin/sh: /home/backup/scripts/backupeitor.pl: Permission ...
-3
votes
1answer
444 views

Which scripting language to use to asynchronously ssh into equipment, run several commands, parse the output, and save to a file on my computer? [closed]

There are several points I'd like to stress in my question. I'd like to login by asynchronously ssh'ing into our infrastructure equipment. Meaning, I do not want to connect to only one device, do ...
0
votes
2answers
89 views

Perl scripts can't be run from an alias

I created the following Alias in httpd.conf: alias /aliasedfolder /some/location/on/the/server/folder <Location /aliasedfolder> AddHandler cgi-script .pl Options +FollowSymLinks +ExecCGI ...
0
votes
1answer
94 views

Linux/Solaris verification ( after hostname change ) in files according to hostname rule

According to the following Perl command ( this command part of ksh script ) I can replaced old hostnames with new hostnames in Linux or Solaris previos_machine_name=linux1a ...
3
votes
1answer
431 views

Cpan/m fails to install Cache::Cache because of method “set_size”

just starting out with perl (trying to get an Request Tracker install working): For some reason I can't install Cache::Cache! (or rather the tests are failing): Notes: perl 5.8.8 on CentOS 5.8 Final ...
-1
votes
3answers
69 views

perl remove two slashes regex [closed]

I have file wich has many lines inside All lines that contain file=/aaaaaaa/bbbbbbb/cccccc/dddddd.txt it needs to be stripped to this format file=/dddddd.txt i am executing perl in bash ...
0
votes
1answer
62 views

what does the perl command do in this script? [closed]

I am working on a system that has a staging environment and a live environment. We have a problem with images not getting pushed to live and I have found the following script that handles it: ...
0
votes
1answer
270 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 , ...
2
votes
3answers
175 views

linux + match only VALID IP from text file into other file

please advice how to match only the valid IPs ( 255.255.255.255 ) from the file.txt and insert only the valid IP into VALID_IP.txt file ( see VALID_IP.txt for example ) the solution should be ...
0
votes
3answers
603 views

When to use Bash, when Python/Perl/Ruby? [closed]

What's your rationale for when to write a Bash script and when to use a more powerful scripting language (Python, Perl, Ruby, ...)? I'm finding that very simple scripts are nicer with Bash, but many ...
0
votes
1answer
796 views

How can I forward email to a perl script on Linux?

I would like all mail sent to a particular alias on a Linux machine to be processed by a perl script but sendmail is giving me a "Service unavailable" error and I don't understand what I'm missing. I ...
2
votes
1answer
2k views

Did not find 'zeroDotZero' in module SNMPv2-SMI

I have a perl script that searches through our switches to find which one hosts a given IP address; this script uses net-snmp libraries to poll through a daisy-chain of ethernet switches (think core / ...
0
votes
2answers
156 views

Mod_Perl configuration for multiple domains

Reading the Mod_Perl module documentation, can we configure it on per domain basis, what I mean can we configure it to run on every domain or specific domain only. What I see in the docs is: ...
1
vote
0answers
317 views

File::Temp version 0.18 required--this is only version 16

I ran YUM on a server running BestPractical's RT. Now Apache won't start. Looking at the error log I get this error: File::Temp version 0.18 required--this is only version 0.16 at ...
0
votes
1answer
99 views

script for changing file dates of postfix Mailbox files

I have a Maildir structure, that got wrongly restored from backup and all files have the file date of the restore instead of when they have been created/received. What would be the best way to ...
1
vote
3answers
169 views

What kind of backup plan do I need for installing perl modules in production?

I manage an application that has been rode hard and put away wet over the years, but is still expected to continue to work. The server OS has been maintained, but the Perl instance has not because ...
1
vote
2answers
2k 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 ...
0
votes
1answer
116 views

Server Performance

I know very little about performance tuning of servers etc... so i thought i'd put this up here as i start some research on it, just to get some direction. I am in the process of migrating from my ...
0
votes
2answers
138 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
1answer
666 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. ...
0
votes
2answers
129 views

linux + create host file from CSV file by sed or awk or perl

I have the following CSV file this file defined which Linux machine exist in the system and there ip's my target is to create host file from this file please advice how to create host file as ...
0
votes
2answers
1k views

Munin with postgresql 9.2

I am trying to set up Munin to collect stats on a server with postgresql 9.1 and 9.2 (the server is currently running 9.1, have tested on a fresh VM with 9.2 to rule out some weird problem on the ...
0
votes
2answers
153 views

Dynamically set current domain in nginx with perl module

I know how to set variables and use subroutines with the nginx builtin perl module INSIDE a "server" directive but, what I need to do is to set/rewrite the current domain before. Let's say, we have a ...
1
vote
1answer
2k views

Configure Perl DBI and DBD in Linux

I am new to Perl and I work in a Linux OEL 5x server. I am trying to configure the Perl DB modules for Oracle connectivity (DBD and DBI modules). Can anyone help me out in the installation procedure? ...
2
votes
1answer
342 views

Can I safely delete the .cpanm/work directory?

I've used cpanm to install cpan perl modules on my system, however the .cpanm/work directory is 100's of megs and I'd like to delete it. Can I delete this directory without adversely affecting my ...
0
votes
3answers
1k views

Perl not working with Nginx via fastcgi, cannot decipher error logs

Im running CentOS 6.2, Nginx 1.2.3 following these Linode Instructions to get Perl to work with Nginx I've done everything upto the point of testing an actual Perl file. When I do this the browser ...
1
vote
1answer
101 views

Using environment variables to keep track of processes launched by cron

My question: I have an if statement in perl where I attempt to detect via environment variables at the time of launching the perl script whether it was launched via a cron job or via normal execution ...