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.

598 questions
6
votes
3 answers

Perl 5.10 on CentOS 5?

I would like to run some perl-scripts on my server that require perl 5.10. Perl 5.10 seems to be released many years ago and is still not available for CentOS5. In #rhel I was recommended to install RHEL6, but I use CentOS. In #centos I was…
chronoz
  • 61
3
votes
2 answers

Exit code 13 from Perl's system() command?

I am trying to call system commands from perl, using system(). That usually works fine, but when I don't start the perl script myself, but have a compiled C program run it using the C popen() function, then perl is not able to execute its system…
user9474
  • 2,458
2
votes
1 answer

perl + ignore "/" char in perl

I want to replace the string America/Adak with America/Jamaica by: perl -i -pe "s/$A/$B/" /etc/sysconfig/clock please advice what need to update in the perl syntax ? ( the problem is that I have "/" so need to ignore this uniq character , …
Diana
  • 261
2
votes
1 answer

perl + install module ( problem: can't find gcc )

please advice: I want to install perl module but after make command I get gcc - - command not found? yael # make gcc -c -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include - D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64…
yael
  • 1,439
2
votes
1 answer

Perl: hide system output

Using Perl 5.8.8 on Linux, need the output of a perl 'system' command to be hidden. The command in my code is: system("wget", "$url", "-Omy_folder/$date-$target.html", "--user-agent=$useragent"); I've tried using > /dev/null 2>&1 in different…
Chris
1
vote
1 answer

automatically click cancel button while i shutdown though program in perl

I wrote program to shutdown system automatically in PERL , while shutdown if we open any file the windows asked that the file will save or cancel , my aim is cancel button automatically clicked and shut the system
balakrishnana
1
vote
1 answer

command in perl script not working

When I place this command in a perl script, it won't work: `chkconfig --level 3 nslcd on`; But if I execute it on a linux command shell, it works. [root@barf Scripts]# chkconfig --level 3 nslcd on I'm curious on why it does't work in a perl…
usa ims
  • 361
  • 1
  • 7
  • 14
1
vote
2 answers

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 doesn't have imposed memory limits like PHP, and…
Kevin
  • 847
1
vote
1 answer

weird behavior of perl's Compress-Zlib?

I'm been going crazy on this one... I've been using the gzflush() function for years in my collectl tool and recently noticed something very unusual with it on debian. I'm actually thinking it's more the fact that it's a newer version of Zlib. The…
1
vote
2 answers

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?
Levani
  • 275
1
vote
1 answer

perl + recursive rename files and directories

Maybe some one have tool script (perl or shell script) that rename files names or directory names? For example The tool needs to read from the file as the following: more file /var Local exportlocal /etc data …
klod
  • 195
1
vote
2 answers

Script output differing from output when command is run manually

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 shown is being cut off. This doesn't happen if I…
Nemekh
  • 11
0
votes
1 answer

Can't locate object method "object_file" via package

When i am installing Params:Validate on my linux server i am getting below error Can't locate object method "object_file" via package "ExtUtils::CBuilder" at /usr/lib/perl5/5.10.0/Module/Build/Base.pm line 3935 But i have installed latest version of…
Raj
  • 1
0
votes
1 answer

nph script corrupted in browser with apache2 v 2.4

I'm trying to figure out why an nph- script in Perl is corrupting from the browser. This is the code: #!/usr/bin/perl print "Content-Type: text/plain\n\n"; print "FOO"; I name it nph-test.cgi, and then run from the browser, I get: If I copy the…
Andrew Newby
  • 1,154
0
votes
2 answers

check_vmware_api.pl can't be launched

I'm trying to use the script check_vmware_api to get informations of my esxi but I get the following error: [root@centreon plugins]# ./check_vmware_api.pl Can't locate Monitoring/Plugin/Functions.pm in @INC (@INC contains: /usr/local/lib64/perl5…
1
2