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
1answer
1k views

bastille cannot find Curses.pm

i am running centos 6 and installed the rpm version of bastille, it cannot find Curses.pm, however perl-Curses is installed and somehow even perl cannot find it. [root@server ~]# /usr/sbin/bastille ...
0
votes
1answer
486 views

Need equivalent of command with nmap, awk and grep for Windows machines with PowerShell and/or Perl

Please see this thread for reference How can I scan using nmap and Zenmap all hostnames that begin with a particular string? One of the answers in the thread above uses the following query (I take ...
0
votes
1answer
200 views

Net::FTPSSL Perl module rename does not work

I'm using the Perl module Net::FTPSSL and 'rename' does not work, everything else does. I've verified the file is there and I can rename it using gui based ftp client but not through the Perl module. ...
1
vote
6answers
3k views

How to find directories that contain only one file?

Does anyone know how to search through thousands of subdirectories for all directories that contain only 1 file and not more than 1 file? Any suggestion on what tool to use or an easy code snippet?
-3
votes
1answer
168 views

What does fork() mean in Perl? [closed]

I have a block of Perl code. I'm having some trouble understanding the same. if(my $child = fork()) { #Do somthing } else { #Run system command return; } Could anyone please make me ...
1
vote
1answer
200 views

How can I run a Perl script in a different timezone?

I need to run a Perl script, but make it think that it is in a different timezone (GMT) than the server is configured to use normally. I would like to do this without modify the existing script, by ...
0
votes
2answers
72 views

Modules to protect PHP and Perl from accessing other users file/data? [closed]

I've use to use a combination of suPHP with suExec in order to try to protect the users and limiting the PHP/Perl from running out of their allowed space (i.e.: user/tmp folders). Its been a while ...
1
vote
2answers
210 views

Run perl file from plesk's scheduled tasks every minute

Can anyone please tell how to run perl file from plesk's scheduled tasks every minute... There are plenty of tutorials for php files but can't find anything useful for perl... Any ideas?
3
votes
4answers
1k views

Coding exercise for Linux Systems Admin?

I am preparing for a Systems Admin(linux) role for a big company(top 10 companies) and one of the requisite is knowledge of a language like perl, python or Ruby. I have a phone interview which ...
0
votes
2answers
62 views

Create a process whose ruser and user are different

Could anyone please help to find a way to create a process whose ruser and user are different? Currently, I used the line sudo su david -c ./test.pl, Then when I type the following line to get the ...
1
vote
2answers
46 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
162 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
122 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 ...
3
votes
3answers
2k views

bad interpreter: Text file busy

For ages I've gotten used to editing Perl CGI scripts in "vi" and simultaneously having a browser open to test them. Lately, I've been getting "500" server errors when I do that, and when I run the ...
0
votes
1answer
127 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
1answer
1k 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? ...
-1
votes
2answers
385 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 ...
1
vote
2answers
452 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
1answer
389 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 ...
7
votes
3answers
244 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 ...
-3
votes
2answers
80 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
147 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
221 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
447 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
47 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
342 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'; ...
1
vote
1answer
58 views

How to run Mason (HTML-Mason) on IIS 7?

I have a website using Mason that I must transfer to an IIS7 server. I followed the instructions here http://www.masonhq.com/?RunningMasonUnderIIS, but they seem specific for IIS 6 and I have ...
1
vote
1answer
189 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
0answers
200 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 ...
0
votes
1answer
118 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
438 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
130 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
vote
2answers
158 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
votes
2answers
108 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 - ...
0
votes
1answer
346 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
120 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
52 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
161 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
364 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
3answers
74 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
88 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 ...
2
votes
2answers
628 views

Install RequestTracker (RT) on Windows Server?

Is it possible to install the latest RT on Windows Server? I've found some installers online for previous versions, but can't find any tutorials for the current version. Currently trying to do ...
-1
votes
3answers
66 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 ...
1
vote
4answers
2k views

Silent and scripted install of CPAN and Perl modules?

I need to install CPAN and some Perl modules automatically in a Scientific Linux (RHEL) installation script. Unfortunately the specific modules I want (at least one of them) cannot be found as RPM:s ...
0
votes
1answer
57 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: ...
2
votes
3answers
169 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
1answer
210 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
2answers
2k 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: ...
0
votes
0answers
87 views

How to change HTTP_REFERER using perl?

I tried to change log format and change HTTP_REFERER using perl to change browser's referrer like below. [pattern1] Log Format : %{HTTP_REFERER}o perl : $ENV{'HTTP_REFERER'} = ...
0
votes
3answers
517 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 ...