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.

589 questions
11
votes
1 answer

Munin Postgres plugins: DBD::Pg not found

I'm trying to activate some of the Postgresql plugins for Munin. When I run munin-node-configure --suggest | grep postgres I get the following output: postgres_bgwriter | no | no [DBD::Pg not found, and cannot do psql yet] postgres_cache_…
benwad
  • 255
  • 2
  • 11
11
votes
5 answers

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 as far as I've seen. So I need to install CPAN,…
Mikael Grönfelt
  • 627
  • 3
  • 7
  • 14
11
votes
4 answers

Handy parsing for numbers with unit suffixes?

Let's say you have data with quantities in human-readable format, such as the output of du -h, and want to further operate on those numbers. Let's say you want to pipe your data through grep to do a summation of a sub-set of that data. You do this…
beans
  • 1,550
  • 13
  • 16
11
votes
3 answers

What happens to an ssh process if the local IP address changes?

I use a perl script (with the Semaphore package) to fire off long-running ssh commands to AWS instances. For several reasons, I do NOT run the ssh commands in the background. Recently, the Comcast fiber to our office building was cut by a…
Morgan Brown
  • 153
  • 1
  • 10
10
votes
3 answers

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.
andreas-h
  • 1,054
  • 1
  • 16
  • 27
8
votes
4 answers

Apache: Permission denied: exec of '/var/www/html/cgi-test/first.pl' failed

So, I'm new to CGI / Perl, I'm trying to move a perl-based web app to a new server. My new server is CentOS 7, which runs Apache HTTPD 2.4.6. I'm trying to get a basic Perl CGI working from an HTTP request. The web request is returning "500 Internal…
oggotron
  • 155
  • 2
  • 2
  • 3
8
votes
5 answers

Pain removing a perl rootkit

So, we host a geoservice webserver thing at the office. Someone apparently broke into this box (probably via ftp or ssh), and put some kind of irc-managed rootkit thing. Now I'm trying to clean the whole thing up, I found the process pid who tries…
paul.ago
  • 201
  • 2
  • 7
8
votes
5 answers

How can I perform a syntax check on an .htaccess file in a shared hosting environment?

I have a build script (Perl) that modifies the .htaccess file when I deploy my applications. As a double-check, I'd like to be able to perform some sort of syntax checking on the created .htaccess file. I am familiar with the idea of using apachectl…
Danny
  • 311
  • 3
  • 10
7
votes
3 answers

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 be faster, i want to install most of my dependencies…
Vincent Membré
  • 406
  • 2
  • 9
7
votes
2 answers

Why are all Linux commands broken after installing Perl?

I installed perl using following command: curl -L http://xrl.us/installperlnix | bash after that i run following command to create soft link ln -sf /usr/local/bin/perl /usr/bin/perl now I'm trying to run commands like dir, mkdir, ll, rm, vi but…
Kashif
  • 473
  • 9
  • 20
7
votes
4 answers

Script to automatically install packages

I want to write a bash or perl script to install a number of packages on my debian based machine. I want it to be something like : aptitude install package1 aptitude install package2 But, I do not know how how to automatically say "yes" through…
Lucas Kauffman
  • 16,818
  • 9
  • 57
  • 92
7
votes
4 answers

Perl or Python, better suited for Unix system automation?

I have been using bash for most of my system administration tasks. I also know a bit of perl. Should I learn Python or Perl is better for system automation. So far from my experience learning perl has been easy.
nitins
  • 2,527
  • 15
  • 42
  • 65
7
votes
2 answers

Perl TDS character sets

I'm using the FreeTDS driver with DBD::Sybase, connecting to an MS SQL Server. When I query certain values of certain records, I get this error: DBD::Sybase::st fetchrow_arrayref failed: OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (9)…
skiphoppy
  • 181
  • 2
  • 6
6
votes
4 answers

500 internal server - AH02429: Response header name

OS Ubuntu Ubuntu 16.04.2 LTS Apache/2.4.18 Perl v5.22.1 So I have perl code that reads a mysql database, and then creates a dynamic webpage. The code's been working great for years. A week ago, my client calls and says they are getting a 500…
user3640899
  • 61
  • 1
  • 1
  • 2
6
votes
2 answers

Spamassassin: Bypass /etc/resolv.conf DNS for querying DNSBL?

Question Is there a way to let spamassassin bypass my linux system's dns servers to query DNSBLs? Background Info When my Server receives email, it is checked by spamassassin. One of this checks looks up the involved mail servers in DNS blacklists.…
geruetzel
  • 143
  • 1
  • 1
  • 12
1
2 3
39 40