Perl is a powerful, high level programming language. Questions about Perl should be limited to the Perl development environment, running Perl, or using Perl to automate tasks on your computer.

learn more… | top users | synonyms

3
votes
1answer
481 views

How to run a Perl script in a Unix environment from Windows?

A little background: I am trying to interact with data I have saved in Perl files using a program I wrote in C using the Win32 API. The C program is in Windows and the Perl files are accessed ...
0
votes
1answer
211 views

Multi-threaded execution of simple perl/python script

Some years ago a friend created a 'benchmark' (Note: Not a benchmark) by which wouldwhich we measure one raw aspect of computing power. Namely how fast (or indeed slowly) the computer could count to ...
0
votes
1answer
32 views

Installing a CPAN module using a remote compiler

I need to install the XML::Parser module. Unfortunately, that package uses expat. Due to security concerns, I am not allowed to install the dev package of expat. making the CPAN Module fail to ...
0
votes
3answers
633 views

Match and remove first and second pattern within xml tags

How can I match and remove first and second pattern within xml tags using sed or awk? Here is the example <data>A78-1-1134-HI-1</data> <data>T78-12-1346-AG-2</data> ...
0
votes
1answer
60 views

How do I specify gcc when compiling mod_perl

I want to test if I have the correct compiler when compiling mod_perl. http://blogs.perl.org/users/neilb/2012/11/problems-building-mod-perl-on-mountain-lion-macosx-108.html. How do you specify gcc ...
0
votes
2answers
1k views

Why am I getting 'ppm: Command not found' on Mac OSX after installng ActiveState Perl?

I'm running Mac OS X 10.7.5. When I type Perl -version I get: This is perl 5, version 12, subversion 3 (v5.12.3) built for darwin-thread-multi-2level (with 2 registered patches, see perl -V for ...
0
votes
1answer
145 views

What is the cause of this ( Timeout: nslookup)?

I have a server with OS RHEL 6 and Apache/2.2.22, sometime I found this error in Apache error log: [error] [client XXXXX] Timeout: nslookup("type" => "MX", "host" => "hotmail.com") at ...
2
votes
1answer
326 views

Installing ffmpeg (namely fdk-aac) on cPanel server causes issues with perl threads

Basically, I'm trying to install FFMPEG on a cPanel server. I'm able to get everything installed and working (tested using ffmpeg -v) except for libfdk-aac. I can do the git clone and everything ...
0
votes
1answer
186 views

Issue after removing perl.i386 package

I am using CentOS and I have tried to remove Perl from my machine to re-install it. For that, I have used 'Yum remove perl.i386' . But it results in the removal of other packages including Graphics. ...
0
votes
0answers
149 views

Error in Perl installation

I have removed the pre-installed Perl and am trying to re-install it. But when I open a file with vim, I get an error like: error while loading shared libraries: libperl.so: cannot open shared ...
0
votes
1answer
37 views

perl search and replace

I have a file love=/abc day=abc night=xyz afternoon=xyzabc I am reading each in value in a variable, now I need to replace the 2nd variable with a particular string. like $1st = "/abc" ...
1
vote
1answer
99 views

Perl search and replace a directories

I have a script where I am reading a file in hash and using one of the values as a search $find = "pqr" and trying to replace with a directory structure $replace = "/abc/xyz/bcd" /usr/bin/perl -0777 ...
0
votes
1answer
918 views

Unable to build Awstats report - permission denied on awstats.pl

I just installed a fresh copy of Awstats 7.1 on my server running CentOS 6.3 and nginx. When I try to run this command to generate the report: /usr/local/awstats/tools/awstats_buildstaticpages.pl ...
1
vote
2answers
141 views

Are there any Linux distributions which have Perl 6 as the default/only Perl version?

The title pretty much says it all. In the same way that Arch Linux has Python 3 as the built-in/main version of Python, are there any Linux/Unixish distros that have done the same with Perl 6? I ...
2
votes
3answers
379 views

matching start of the line in cygwin regexp

I apply sed 's/^ bug*/__/' to ref bug bug ref and get ref __ __ ref The same is responded for perl, perl -ni -e 's/^ bug/__/; print'. Sample file can be downloaded ...
1
vote
1answer
1k views

How to remove perl script process taking up CPU

I've got a process running on my server (CentOS 5.2) that is taking up 99-100% of my CPU. The ps command reveals the name fakeproc as follows: 30571 ? R 3620:06 fakeproc Running top ...
0
votes
0answers
159 views

Permission denied httpd webrequest to perl

Sorry for the somewhat confusing title, and my lacking English. Now we have that out of the way my question: I have httpd - Apache/2.2.15 on a CentOs virtual machine. This is running Seccubus, with ...
1
vote
1answer
352 views

cpan fails with “Error code 130, while making 'pm_to_blib'”

I recently installed Perl on my Windows 7 machine. Upon running cpan App::cpanminus, I got the following error: D:\Perl>cpan App::cpanminus CPAN: CPAN::SQLite loaded ok (v0.199) Database was ...
1
vote
1answer
125 views

Keeping a Perl script from automatically terminating in terminal

I'm trying to create a shortcut of sorts to a Perl script, by saving a terminal command which launches the script to a .command file. The script is interactive, and allows for the user to interface ...
5
votes
1answer
623 views

Using Torsocks on Mac OS X 10.8.2

I used Torsock and usewithtor fine when I had MAC OS X 10.6, and didn't use it for a while. I upgraded to Mountain Lion a few months ago, and I tried to use it but no luck on it. Output is following: ...
3
votes
1answer
624 views

Error when installing cpanminus on Mac OS X

I am trying to install cpanminus through the terminal using the command given on the website: sudo cpan App::cpanminus However I receive the following error: N01-0545---MB:CPAN-1.9800 sucadmin$ ...
1
vote
2answers
421 views

am using ubuntu 12.10. unable to use PHP_PERL extension. Unable to install the extension as well

I need to run a Perl script because I need a module that Perl has that PHP does not. This is my code for testing purposes in PHP <?php echo ("Hello World"); $perl = new Perl(); ...
2
votes
0answers
121 views

Install perl module from rpm file

I have a perl issue and obviously I'm not a perl expert. I can not use CPAN. I've installed File::Pid using a rpm, or I tried. I downloaded perl-File-Pid-1.01-3.el5.noarch.rpm (and the ...
2
votes
1answer
663 views

Change my terminal's character set in Ubuntu

I would like to process with perl some files in Greek in which the character encoding is Greek (ISO-8859-7) but my terminal doesn't support such an encoding. Can I add it somehow?
0
votes
2answers
95 views

For loop with conditions

I have a script that adds user on many server. Since I'm adding on many server(s) I am using for loop. Below are the output when user is successfully added. 0,22529,User added. If the user is not ...
0
votes
2answers
290 views

Handling MS office documents on Linux without root access

I have a linux hosting account with Godaddy (Centos 5.5), and I am developing an application to process users MS Office documents. I have found solutions such as antiword, unoconv, catdoc, Apach ...
0
votes
1answer
250 views

Identify text/ASCII files in Linux/Solaris

I have a little project to build a bash script that searches the OS (Linux/Solaris) for the current IP address in files, and replaces them with another IP address. The problem is that IP address ...
1
vote
0answers
259 views

How to reinstall default Perl on Mac osx?

I accidently deleted the default Perl library on Mac OSX Mountain Lion. I know it was a stupid mistake, but how do I fix it? Whenever I try to use Perl I get dyld: Library not loaded: ...
1
vote
0answers
149 views

2-thread Perl program slower if run using a RAMdisk within a Virtualbox?

I run a perl script inside a Virtualbox (both the host and guest OS are Windows 7). The Virtualbox has been given 4 CPUs out of 8 (everything runs on a Intel i7) and 3 GB RAM (out of 8 available). ...
0
votes
1answer
210 views

Check file name and filter it based on the date

I have many files one of my scripts generate daily. The file name structure resembles: capacity_data_2012-12-02.txt , capacity_data_2012-12-03.txt and so on... I want to create a script which would ...
1
vote
1answer
592 views

Add, replace or delete something/everything between two strings with regexxer

I'm using regexxer to translate an application that use .php files. In accordance to the webpage it's based on usage and syntax of Perl regular expressions. It looks more to be applied to Perl code. ...
0
votes
2answers
388 views

creating CDF data using bash or awk or perl

we have some data like: 12 0 13 0 20 0 25 1 64 4 77 1 89 100 1201 204 I'd like to get this output: 3 0 5 1 6 4 7 100 8 204 explanation: we have 3 AS(autonomous systems) that have degree of ...
3
votes
1answer
2k views

Counting occurrences in first column of a file

We have this file: 1 2 1 3 1 2 3 3 52 1 52 300 and 1000 more. I want to count the number of times each value occurs in the first column. 1 3 3 1 52 2 This means we saw 1 three times. How ...
4
votes
3answers
89 views

Output numbers from a file in a different order

I have a file that contains: 1 2 3 4 1 3 5 4 8 3 2 1 Each line has a different number of digits. And there are 1000 more like this. I want the output like this: 1 2 2 3 3 4 4 0 1 3 3 5 5 4 4 8 8 ...
6
votes
3answers
307 views

Remove duplicates in each line of a file

How can I remove duplicates in each line, for example here? 1 1 1 2 1 2 3 5 5 4 1 2 3 3 I'd like to get this output: 1 2 3 5 4 1 2 3 There are lots of lines (100,000) and in each line I want ...
0
votes
1answer
955 views

In Fedora, Perl program cannot find Time::Piece library

I have a Perl program named /usr/bin/octbatch running as a script on Fedora 17 Linux. When I run this command: /usr/bin/octbatch I get the error: Can't locate Time/Piece.pm in @INC (@INC ...
3
votes
3answers
1k views

How to edit the header of a huge CSV file in-place?

I have several huge CSV files in which I want to swap two column names. I do not want to modify/copy/rewrite the data. The operation is very cheap in C: fopen the file, fgets the header, fseek or ...
0
votes
2answers
239 views

How do I turn off the perl-specific parts of find-requires when building an RPM?

rpmbuild will scan Perl modules to find Perl dependencies, but it doesn't understand optional modules and its generated Perl module requirement list will often be wrong. How can I turn this feature ...
0
votes
0answers
208 views

Different epoch times on 2 machines: Where to configure correctly?

I have 2 linux machines that need to run a Perl script and access a database. The date (as reported by the date and date -u commands) is correct (within a couple of minutes), but returning epoch from ...
0
votes
2answers
1k views

Perl program not getting executed in xampp

I am very new to CGI programming in Perl. In order to learn it i installed xampp 2 days back. But I am unable to execute my perl code . The code goes as folows: #!/usr/bin/perl use CGI; $co = new ...
0
votes
1answer
231 views

rsync within a perl script having permission errors

I have a share on one mac that I am trying to rsync a set of directories from a second mac. The share is mounted on the second mac and ls -l shows access like for all the directories drwx---rwx 1 ...
0
votes
3answers
636 views

Create a term-document matrix from files

I have a set of files from example001.txt to example100.txt. Each file contains a list of keywords from a superset (the superset is available if we want it). So example001.txt might contain apple ...
0
votes
1answer
258 views

script to convert GB to TB

I have (multiple) files like below list. Few of them has both the values in TB and couple of files in GB. Now if you clearly see the file output there are two rows with Total capacity and Capacity ...
1
vote
2answers
121 views

what is (3pm), when I run apropos Unicode in see entries like this Unicode::CharName (3pm)

apropos unicode Pango::ScriptIter (3pm) - used to break a string of Unicode into runs by text Unicode::CharName (3pm) - Look up Unicode character names Unicode::Map (3pm) - (unknown subject) ...
2
votes
2answers
1k views

Script to prefix filename with folder

I am trying to find a script that will work in Windows and prefix all files in a folder with the containing folder name. For example, in the folder C:\FolderName1 there are 3 files: hello.jpg ...
0
votes
1answer
205 views

Perl installation on Debian vs CentOS

As described here at http://www.directadmin.com/forum/showthread.php?t=43558&page=1 I am trying to find the equivalent apt-get install commands for the current version of Debian for: yum ...
-2
votes
1answer
64 views

Need script FOR loop in shell or perl

I am looking for loop condition which would help me to run below commmand. mccli backup show --name=abc.com name=server_name I dont want to run the command everytime with changing server name. ...
0
votes
1answer
119 views

How do I run the sphere-slicer.pl perl command to make a photo into a sphere?

I was looking for a program to slice pictures somehow to paste it on a globe(sphere). I found ip-slicer in this website. http://www.bruno.postle.net/2001/ip-slicer/ The problem I have is that I don't ...
1
vote
0answers
238 views

Mac 10.7 - Cannot use make utility after installing xcode

I'm trying to install a perl module that I manually downloaded from CPAN, but am encountering difficulties. $perl Makefile.PL Welcome to JSON (v.2.53) ============================= If you install ...
3
votes
3answers
450 views

create PDF montage in vector format

I have a folder full of images in PDF format, and I would like to merge them all into a single PDF in which there are many images on each page, but still in vector/PDF format. The ImageMagick ...