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.

From the Perl documentation:

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 language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal).


Free Perl Programming Books

If you are just starting out with Perl some of the references below may be worth looking in to.

596 questions
0
votes
2 answers

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 AddHandler cgi-script .pl Options +FollowSymLinks +ExecCGI Order allow,deny Allow from all AllowOverride…
0
votes
1 answer

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 new_machine_name=Red_Hat_linux1a export previos_machine_name export…
yael
  • 2,433
  • 5
  • 31
  • 43
0
votes
1 answer

what does the perl command do in this script?

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: #!/bin/sh # # Script to handle copy of NR images to…
geoffs3310
  • 113
  • 2
0
votes
3 answers

When to use Bash, when Python/Perl/Ruby?

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 of those get quite fancy over time, and it never…
futlib
  • 111
  • 1
0
votes
3 answers

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 created my handle_email.pl script (right now,…
Graeme Perrow
  • 555
  • 1
  • 4
  • 16
0
votes
1 answer

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 correct this? I think about recursively reading the…
perler
  • 531
  • 2
  • 6
  • 10
0
votes
1 answer

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 old server to a new one - both are 64 bit…
sb12
  • 101
  • 1
0
votes
2 answers

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. The audit log shows something like type=AVC…
Steed
  • 19
  • 3
0
votes
2 answers

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 example 1 from my CSV file ( I need to match the IP…
yael
  • 2,433
  • 5
  • 31
  • 43
0
votes
2 answers

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 running server. I had to patch some of the plugins…
jreid9001
  • 161
  • 2
  • 6
0
votes
2 answers

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 domain like admin.foobar.website.com I want…
0
votes
3 answers

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 says: The page you are looking for is temporarily…
ProfessionalAmateur
  • 937
  • 6
  • 17
  • 27
0
votes
1 answer

run specific perl script as root under apache

I have a perl program that runs fine when called through the Internet via apache on Fedora Linux server. In that perl script I have a system command which does not run because it needs to be run as root. I realize all the security ramifications but…
xivix
  • 553
  • 2
  • 8
  • 16
0
votes
1 answer

perl dbd::mysql cant install (from asterisk perl script)

I ve got problem with perl script for asterisk. I've investigate that when tping use DBI; -- all statcks. After that i added: my @driver_names = DBI->available_drivers; foreach (@driver_names){print $MYFILE "Driver = $_\n";} **OUTPUT** Driver =…
MealstroM
  • 1,517
  • 1
  • 17
  • 32
0
votes
1 answer

Mod_Perl AddType .pl execution on apache

I've recently been using PHP via mod_php, and I assumed that getting mod_perl running properly was going to require a similar setup: AddType application/x-httpd-php .php unfortunately this does nothing with mod_perl using: AddType…
Hawken
  • 295
  • 1
  • 2
  • 12