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

1
vote
2answers
214 views

Where to obtain logs after Xorg freezes

I have this issue where a perl script will sometimes freeze Xorg. It's an extension for urxvt that detects URLs and allows me to "launch" them in the browser. Sometimes, upon launching, Xorg will ...
1
vote
0answers
531 views

Get sublime text 2 (sublimecodeintel) to parse mason

So Sublime Text 2 seems to getting a lot of love lately. I am using the Sublime Code intel plugin, https://github.com/Kronuz/SublimeCodeIntel for auto completion. The problem is, it does not recognize ...
2
votes
1answer
45 views

Synchronizing perl packages from one install to another

I currently have perl 5.8.8 installed on a production linux system, and there are many, many packages installed. I am planning on installing perl 5.16 under a prefix (from source). Is there any way ...
0
votes
1answer
243 views

Ubuntu: perl: undefined symbol: PL_perl_destruct_level

Recently, I tried to crosscompile Perl on my Ubuntu system but made a mistake. The finished binary was installed on my productive system besides the already present perl version. Ever since I get the ...
3
votes
1answer
979 views

SSL trouble in Perl's LWP after Debian Wheezy upgrade

I just upgraded to Debian Wheezy from Lenny (long story) and a few of my Perl packages didn't make the upgrade for some reason, among them Crypt::SSLeay (libcrypt-ssleay-perl). I was unable to ...
1
vote
1answer
165 views

Searching current directory and 1 subdirectory for files with .txt extension

Using the 'ls -R' command in perl, what is the parameter to find files with a .txt extension under the current and 1 subdirectory? Also I how would I count the number of files and if the number is one ...
2
votes
1answer
828 views

Perl error while compiling Munin transmission plugin

Could you please tell me what this error says?: Can't locate JSON/RPC/Client.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 ...
1
vote
2answers
1k views

Perl EPIC Not recognising installed CPAN modules

Eclipse on a mac, was working fine adding new modules until I Installed Text::CSV_XS which Eclips doesn't recognise as added to @INC For instance use strict; use SOAP::Transport::HTTP; ...
0
votes
1answer
226 views

Converting between a vim replace and a perl pie replace

So I have a file test.txt, that contains, home -> range If I edit the file in vim and run the command %s/^\(.*\)->\(.*\)$/\2 ::= \1 ;/g it converts the file to range ::= home ; which is ...
2
votes
1answer
1k views

Notepad++ Perl Multi-line comment syntax highlighting

Is there a way to set notepad++ to highlight a Perl multi-line comment block as comments (currently there is no highlighting - it's black on white). The type of comment I am talking about is of the ...
0
votes
1answer
423 views

Linux replace ^M$ with $ in csv

I'm working on migrating from MDaemon to Google Apps. As part of this process I'm exporting the contacts and calendars for all of our users into CSV files then reading them into a perl script and ...
0
votes
1answer
2k views

how to install libio-socket-ssl-perl on tiny core Linux?

I found this commands on another pages: apt-get install libio-socket-ssl-perl tce-load -wi libio-socket-ssl-perl but doesnt work. Any idea to install libio-socket-ssl-perl on tiny core ...
3
votes
2answers
2k views

perl - translate sed to perl

The following command work fine on Solaris ( delete line only if last character is ":" ) sed -e '/:$/d' < foo > foo.new how to do the same in perl ? ( the reason for that because I not want ...
0
votes
1answer
1k views

'perl' is not recognized as an internal or external command: Even when there is nothing about perl?

Ok, I just installed MinGW on my PC and to used g++ command on cmd and it says, 'perl' is not recognized as an internal or external command, operable program or batch file. I just checked PATH ...
0
votes
0answers
125 views

Mock --init failing on perl command

I have a rather unique situation here that about 2 hours of googling couldn't help me with. I'm building a project using Cmake that will eventually generate rpms for target architectures using mock. ...
4
votes
2answers
5k views

How can I identify non-ASCII characters from the shell?

Is there a simple way to print all non-ASCII characters and the line numbers on which they occur in a file using a command line utility such as grep, awk, perl, etc? I want to change the encoding of ...
1
vote
1answer
3k views

Perl for matching with regular expressions in Terminal?

I'm trying to familiarize myself a little with Perl to use for regular expression searches in Terminal (Mac). Now, I'm not really looking to learn Perl rigourously, just trying to find out how to do ...
1
vote
2answers
138 views

Installing a second version of e.g. git, perl and or python on osx lion

At the moment i am running git 1.7.5.4, perl 5.12.3 as well as python 2.7.1 on osx 10.7.3, which were all included in the basic system setup. Applying the "which" command the locations are: ...
16
votes
5answers
25k views

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

We are doing all our scripting with Bash so far, but I'm starting to feel a bit silly about it. While we can of course do everything we want with Bash (it's quite powerful), I'm starting to wonder if ...
0
votes
1answer
3k views

How to uninstall Perl version 5.10.1 from Ubuntu 10.4 and install a single threaded version of Perl?

I have to uninstall Perl version 5.10.1 from Ubuntu 10.4 and install a single threaded version of Perl. What commands should I run on terminal to do this? Or, is there another way to uninstall the ...
1
vote
1answer
605 views

Apache can't load dbi module in mac os x

I installed dbd:mysql via cpan. I have the following simple script: #!/usr/bin/perl -U use DBI; $ds = 'DBI:mysql:project:localhost'; $user = 'root'; $password = '123456'; $db = DBI->connect($ds, ...
3
votes
1answer
666 views

How can uptime be used to trigger an action?

I want to write shell or perl code which would give me notification after x days. Basically on SUSE Linux server, there is reboot required after 208 days, else the system would freeze. This is known ...
1
vote
2answers
4k views

Need to configure perl

I was going to run a perl program and then I got this error message: Can't locate JSON.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 ...
0
votes
0answers
177 views

How to reinstall Perl on OS X

I accidentally deleted the /System/Library/Perl/ folder. Now I am not be able to run any of my projects. How can I reinstall Perl on OS X?
2
votes
1answer
1k views

Estimating compressed file size using a list parameter

I am currently compressing a list of files from a directory in the following format: tar -cvjf test_1.tar.gz -T test_1.lst --no-recursion The above command will compress only those files ...
2
votes
1answer
263 views

Cygwin wants to downgrade my Perl

I'm using Cygwin 2.769. I used setup.exe to upgrade Perl to version 5.14.1-2, which works fine. But now whenever I open setup.exe to upgrade/install some other package, it by default wants to ...
1
vote
1answer
579 views

Script or program to download all images in a folder

I'm currently using windows 7, and I was wondering if there is perhaps a perl script or a program I can install to download files from a given directory. For example, I want to be able to specify that ...
3
votes
4answers
3k views

Perl Package Manager via NTLM proxy

I've installed ActivePerl and the include PPM at work, but I'm unable to get it connect to the module repository through the proxy. I've set up an environment variable HTTP_PROXY = ...
0
votes
1answer
633 views

Eclipse lost line numbers

My eclipse no longer shows line numbers, its configured to do and it did before (I believe it became like this after I moved its application folder, mac osx) The settings read that it's supposed ...
1
vote
1answer
2k views

Can someone explain why LWP::Simple is satisfied by perl-libwww-perl?

Installing Munin on RHEL 6 from RPM available at, http://pkgs.repoforge.org/ most installs were ok but when installing munin-node got this: rpm -Uvh munin-node-1.2.5-1.el5.rf.noarch.rpm warning: ...
1
vote
2answers
1k views

Building VIM with python support in Cygwin?

I'm trying to build VIM with Python/Perl support under Cygwin. Has anyone done this and can shed some light how this is achieved?
8
votes
6answers
7k views

unix - split a huge .gz file by line

I'm sure someone has had the below need, what is a quick way of splitting a huge .gz file by line? The underlying text file has 120million rows. I don't have enough disk space to gunzip the entire ...
14
votes
6answers
7k views

Removing ANSI color codes from text stream

Examining the output from perl -e 'use Term::ANSIColor; print color "white"; print "ABC\n"; print color "reset";' in a text editor (e.g., vi) shows the following: ^[[37mABC ^[[0m How would one ...
1
vote
4answers
616 views

sed removal of whitespace

I find that sed often fails to pattern-match whitespace. Consider the following examples: echo 'A B C' | sed 's/[ \t]*//g' ABC echo -e 'A\tB\tC' | sed 's/[ \t]*//g' A B C perl ...
0
votes
1answer
293 views

awk + sed + match complex string

I need useful command to match the string "/pci.../pci.../pci..../scsi..../disk..." with awk or sed? ( I need to put this command in my ksh script ) remark 1 [...] can be any string , and “pci pci ...
0
votes
2answers
710 views

egrep: CPU and memory usage

My Linux machine has 16 processors and free memory of 70 GB but when I run an egrep command, the command is using (checked through the top command) 100% of CPU and 0.5 of memory: 22391 aime 25 ...
1
vote
2answers
449 views

How to pass bash variables (passwords) to IRSSI config file?

I'm using IRSSI and I wonder how can I pass my IRC channel's passwords to the IRSSI config file (~/.irssi/config) without writing them directly in the file. In Mutt I've an awk command that queries a ...
0
votes
2answers
50 views

How to do create a thumbnail of many sites?

I've got a list of 2500 websites and need to grab a little screenshot of them - to create a thumbnail How do I do that? Well I could try to parse the sites. Either with Perl or Python
2
votes
3answers
28k views

How to install Perl on Ubuntu Server?

I'm trying to deploy an application which according to the documentation requires the following: 2.2.5. Perl LMS-MGC and the rest of Perl scripts requires also Perl interpreter and some modules: ...
5
votes
2answers
419 views

What is causing git byte order error?

I can no longer git svn rebase (using msysgit on Windows 7). The error starts with: Byte order is not compatible at ../../lib/Storable.pm And ends with: Could not unmemoize function ...
1
vote
2answers
194 views

Split a file by two consecutive newlines

I have text file like this 1. some topic a 20p ID: 20 2. something topic another here there ID: 30 3. ... here come another ID: 40 They are separate by two newlines. How could I split this into ...
1
vote
3answers
3k views

How do I delete a certain line from a file with Perl?

How would I delete the line [[ -f /var/tmp/Li.ksh ]] && /var/tmp/Li.ksh from a file by a perl command in a ksh script? I tried: perl -i -pe "s/[[ -f /var/tmp/Li.ksh ]] && ...
1
vote
1answer
109 views

CPAN install to many directories

When I install stuff locally (not as root) with CPAN, it ends up putting things in a multitude of places. So much so, that I have to set PERL5LIB to five directories! Here's the CPAN settings where ...
0
votes
2answers
861 views

Make Tor use Unique IP for each instance open

How can I get Tor to use a unique IP for each instance of Tor open in C++, Python or Perl? Is there a command to force it to use a unique IP that I can just call using subprocess? *cheers
34
votes
12answers
4k views

How do I remove a file in Linux whose name looks like it's ONLY a hyphen, as in “-”

I've tried rm -- - rm "-" rm "\-" rm \- Gave Perl a shot ~$ perl -e '$junk = glob("-"); chomp $junk; print "$junk\n"; `rm $junk`;' - rm: cannot remove `-': No such file or directory ...and... ...
0
votes
1answer
241 views

Use “find” command to list files IN specified directory

I'm putting together a perl script, and I'm using the following command to list all files and directories under a specified directory `find $dir -print` This lists all files and directories UNDER ...
3
votes
1answer
171 views

How do I model a Perl class with “::” in StarUML?

In StarUML, how can I model a Perl class which uses :: in its name? It doesn't allow :: in the class name, reporting: Element name cannot contain "::" Is there a way to work around this ...
1
vote
2answers
632 views

Automatically Running Perl Script

Is it possible to have a Perl Program constantly running while my PC is on? If so, how do you do it?
11
votes
8answers
12k views

How do I queue multiple files for copying on a Mac?

When I copy multiple files on a Mac, the system tries to copy them all at the same time. The problem is two-fold. First of all, when you select multiple files and copy them, they all go into one ...
1
vote
3answers
469 views

SW to replace a string in Windows

I have a text file (actually XML) that I want to be able to change using a command line. In other words, as part of a Windows batch, I want to locate a string (in this case @@@@, which uses a ...