Perl is a high-level programming language that comes installed by default in Ubuntu. It is well known for it's use for text manipulation, CGI scripts and it's huge community. You can find any modul and many tutorials on http://www.cpan.org/

learn more… | top users | synonyms

12
votes
1answer
15k views

How to set locale?

After a clean Ubuntu Server install, I get the following error when running 'perl'. perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = ...
7
votes
4answers
979 views

CPAN vs. APT: Conflicts in versions?

I can't find the answer to this anywhere: Does a module installed via APT conflict with one installed via CPAN? Along with that question are these: Where does the installed CPAN modules live? Are ...
7
votes
4answers
60k views

How do I update/install Perl

The Perl package is in /usr/bin and is an older version (5.12.4) and the current stable release appears to be 5.14.2. How do I update this version? Root access is required, and I do not want to ...
6
votes
2answers
3k views

How do I undo an accidental installation of all Perl modules?

I was attempting to upgrade my Perl modules through CPAN, but I did not supply a regex/module name to upgrade: perl -MCPAN -e 'upgrade'; I can only assume the worst (which seems to be supported by the ...
5
votes
1answer
2k views

How to create Excel xlsx files from a script?

I'm looking for packages available in Ubuntu main/universe repositories (14.04) able to create Excel 2007+ xlsx files from a script (python3 or perl) My requirements: 100% compatible Excel XLSX ...
4
votes
3answers
362 views

Searching for patterns in csv files

I have file.csv that looks like this 4,6,18,23,26 5,12,19,29,31 2,5,13,16,30 9,10,24,27,32 4,5,10,19,22 4,6,8,10,25 2,3,4,25,11 I want to find some patterns and save them in another log file ...
4
votes
1answer
950 views

Rename - what does s// vs y// mean?

The man page (http://manpages.ubuntu.com/manpages/dapper/man1/prename.1.html) gives two examples: rename ’s/\.bak$//’ *.bak rename ’y/A-Z/a-z/’ * So it's either s or y and then ...
4
votes
1answer
1k views

Perl doesn't include directory

I have a problem with perl5 with ubuntu. I've got a script, in which I include several directories. When starting the script, the shell returns Can't locate XML/Twig.pm in @INC (@INC contains: ...
4
votes
1answer
3k views

Using Modifiers of Perl-compatible Regex (PCRE) in grep

According to grep --help and man grep, we can use the -P option in order to interpret the pattern as a Perl regular expression (PCRE, to be precise), instead of the default POSIX basic regular ...
3
votes
3answers
2k views

How can I use perl 5.12 in 10.10?

How can I use perl 5.12 in Ubuntu? There is no distribution package on Ubuntu. I have to use feature 'unicode_strings'; in my perl code, and this is available from 5.12. I try to install perl on ...
3
votes
2answers
8k views

Installing libwww-perl on Ubuntu 12.04,SE

I have an Ubuntu 12.04 server edition which I ssh into. I am running Perl scripts on this server but it fails when I load 'use LWP::UserAgent;' with error message: Can't locate LWP/UserAgent.pm in ...
3
votes
1answer
10k views

How to install Perl Switch.pm module required to build WebKit-GTK?

I noticed that the perl version (5.14) shipped with 12.10 does not include the Switch.pm module needed while building WebKiT-GTK. Looking around on the internet I found few suggestions indicating ...
3
votes
2answers
2k views

Shell script to restart a process if it outputs a certain piece of text

I have a python program which, from time to time, crashes with a number of different exceptions usually due to network issues. The only way to get it to work is to restart it. How would I write a ...
3
votes
1answer
276 views

yum whatprovides 'perl(Foo::Bar)' equivalent with apt or dpkg?

This is certainly related to this question, but I feel it doesn't overlap, so here we go. How can I get the functionality of the following command on Ubuntu (and/or Debian as bonus): yum whatprovides ...
3
votes
1answer
821 views

Ubuntu Upgrade, Perl Version Broke ZImbra

Kind of in a bind here, since I heard about the bash bugs last night I decided on upgrading all off my server, not just the packages but the complete OS, it worked fine on all my servers, except my ...
3
votes
1answer
256 views

Get Quotes for stock prices in GnuCash using Finance::Quote

I have followed the instructions here, using the exact example, to have automatic stock price updates in GnuCash. When I click price editor -> Get Quotes it returns in a warning Unable to retrieve ...
3
votes
1answer
191 views

Why cant i find site_perl directory in Ubuntu?

I am compiling a program from source code. It requires path to my site_perl directory. When I run perl -V, i see that there is /usr/local/lib/site_perl at the end but i cant find the directory in the ...
2
votes
5answers
5k views

How do I setup sendmail, postfix, or dovecot so that perl can send emails?

Direct Question: I want to enable Perl to send emails. What package(s) should I install to setup a simplistic email server: no need for incoming, only outgoing. I can forward through gmail's SMTP if ...
2
votes
5answers
6k views

How to batch rename files with “variables”? [duplicate]

I use xmbc to view my tv shows. Before I began using xmbc, I batch downloaded the first few seasons of "Bleach". What can I say, I'm an anime fan ;-). These are named: "bleachxx.mp4" where xx is the ...
2
votes
2answers
151 views

How to correctly invoke awk in Perl to print out the 3rd last field in a line?

My script is: #!/usr/bin/perl -w my $line="1 2 3 4 5 6 7"; print $line; my $thirdlast=`print $line |awk '{print $(NF-3)}'`; print $thirdlast; The output is: 1 2 3 4 5 6 7 awk: 0602-542 There is ...
2
votes
1answer
1k views

How do I run asciiquarium in out-of-the-box ubuntu?

Asciiquarium is a perl script that requires Term::Animation. What are the appropriate hoops to jump through to get this cpan module into an ubuntu perl install? apt-cache search animation |grep -i ...
2
votes
2answers
179 views

How to add space to Exec path in a Thumbnailer descrption?

I wish to use mplayer to generate thumbnails for nautilus, so I wrote a perl script as the thumbnailer named "gnome_thumbnailer_with_mplayer", and wrote a description in /usr/share/thumbnailers to ...
2
votes
1answer
74 views

Can a script resume after computer comes out of hibernation?

I kept a perl script running and then forgot it and hibernated my laptop running Ubuntu. When I restarted it, the script was seen to be running (pleasant surprise!). Is this correct behaviour or did ...
2
votes
1answer
747 views

Why doesn't Perl use latest version by default?

When I try to use new perl features (like "say" instead of "print") the code fails until I put in the line "use 5.014;" and then everything runs. My installed version of perl is 5.14.2, and it looks ...
2
votes
2answers
11k views

How I can install RRD module in perl?

I'm very new to Ubuntu. I'm using Nagios Graph plugin. That plugin needs perl RRD module to be installed on my system. How I can install that? Thanks in advance.
2
votes
1answer
551 views

How do I install Gournal?

I am trying to install Gournal and I can't because of a missing dependency which doesn't appear to be in natty? gournal : Depends: libgnome2-print-perl but it is not installable
2
votes
1answer
150 views

How can I programatically find out which CPAN modules relate to packaged modules?

I am trying to write an Juju formula for App::Alice, a web based IRC client. According to the the installation instructions I execute the following commands to snag Alice and all of it's dependencies ...
2
votes
2answers
99 views

Removing a string of files with rename

I have been trying to batch rename a bunch of files so that they are consistent and fit within the name structure that I have come up with. For instance,I am renaming comics, and so I have a directory ...
2
votes
1answer
897 views

Unable to install a CGI script on Ubuntu

I'm trying to install CGIProxy on Ubuntu. http://www.jmarshall.com/tools/cgiproxy/install.html#install Basically it's a single "nph-proxy.cgi" file which I placed in my /var/www folder. I used ...
2
votes
1answer
157 views

Perl module Set::IntervalTree is not installing

Please help me resolve this issue. I am trying to install a Perl module Set::IntervalTree in Ubuntu. I am repeatedly receiving the following error: cpan[1]> install Set::IntervalTree CPAN: ...
2
votes
1answer
381 views

How to resolve Perl module error while trying to run NGS QC Toolkit?

I was trying to run NGS QC Toolkit http://59.163.192.90:8080/ngsqctoolkit/ in Ubuntu 12.04 LTS 64 bit version. But, after executing the command, an error shows that states it cannot find module ...
2
votes
1answer
41 views

Perl may be unconfigured?

Hi I have error when I want to install,remove or configure my package this is the error debconf: Perl may be unconfigured (Can't locate Debconf/Log.pm in @INC (you may need to install the ...
2
votes
2answers
226 views

How to repair fonts for Perl/Tk (14.04)

With Ubuntu 14. 04 I have Perl 5.18.2 for x86_64-Linux-gnu-thread-multi on my laptop which is nice, but after installing Perl/Tk-804.032 from CPAN I seem to only get non-antialiased fonts (scaled ...
2
votes
1answer
88 views

Error installing SHA

I'm trying to install SHA using the following command perl -MCPAN -e 'install Digest::SHA' I also tried using: sudo cpan 'install Digest::SHA' But i'm getting a linker error: ...
2
votes
1answer
147 views

Different behavior when launched from terminal instead of Unity launcher

I have written two Perl/Gtk programs. When launched from the dash menu, they run just fine. However, if I try to launch them from terminal using the very same command found in their .desktop files, ...
2
votes
2answers
9k views

E: Sub-process /usr/bin/dpkg returned an error code (1) seems to be choking on kde-runtime-data version issue [closed]

12.04 LTS, on a dell mini 10. Install stable until about a week ago. Updated about 1x a week, sometimes more often. Several days ago, I booted up and the system was no longer working correctly. All ...
1
vote
3answers
100 views

Forming IPAddresses from Text file

I have a huge text file that contains IP addresses scrambled all over but not in one unit for example. So what the@192@ heck are you doing@168@ in my house @10@.you were not @16@ supposed to be ...
1
vote
3answers
65 views

csv file adding and removing characters from rows [closed]

I have a big csv full that looks like so else if(a,b,c,d,e) else if(a,b,c,d,f) I want to make it look like so else if(a+x==b and b+x==c and c+x==d and d+x==e) else if(a+x==b and b+x==c and c+x==d ...
1
vote
3answers
78 views

Replace a specific section of code

I don't know what could do this, sed, vim, whatever. Lets say I have 30 functions, to keep it simple, i'll show 3 #first function AddOne = [ a+1==b, b+1==c ] # second function ...
1
vote
2answers
78 views

Looping through csv, removing patterns

I have a question similar to my earlier question, but a bit different say you have 10 columns on each line, and 100000 lines, I want to check if each row for the following patterns: If a row looks ...
1
vote
2answers
6k views

Why does my Perl CGI script raise an internal server error on Apache?

I've installed apache2 on Ubuntu 11.04, and localhost is working. I created a simple printenv.pl script and put it in the following directory $ mv printenv.pl /usr/lib/cgi-bin/ $ chmod +rx ...
1
vote
4answers
81 views

search for duplicate photos

I have photos, in folder A, they also exist, in folders B and C. They have the same filenames. How to search for them and delete them from folder A? A perl script or something would be ideal since I ...
1
vote
1answer
126 views

Error while running perl command on Ubuntu

ruby@ruby-Z87X-HD3:~$ sudo apt-get install libpdf-api2-perl Reading package lists... Done Building dependency tree Reading state information... Done libpdf-api2-perl is already the newest ...
1
vote
1answer
927 views

How to run a Perl command?

If I am running the following command to replace a string dst_ with dst_addr_ in multiple files. perl -pi -w -e ’s/dst_/dst_addr_/g;’ *.tcl it shows the following error: Unrecognized character ...
1
vote
1answer
66 views

Detect Ubuntu using perl

I am working on a perl script that must write configuration file. I need to know if the script is running on Ubuntu to set some Ubuntu-specific values (basically, disable the unified bar). The script ...
1
vote
1answer
599 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 ...
1
vote
1answer
2k views

What perl version will be in 12.04 LTS

Pretty soon the new 12.04 version of ubuntu will be released. My question is what version of perl language will be in this distribution. And my second version where can this information be found.
1
vote
1answer
34 views

Add Prefix name in a file in Perl Script

I am trying to write a perl script to add the prefix name on the file (~100 files), but i am failed to get it done. Example case that what I means: abc.jpg change to NYear_abc.jpg def.jpg ...
1
vote
2answers
607 views

Perl 5.20.1 for Ubuntu 14.04

How to update to the latest perl in ubuntu 14.04 x64? Ive tried via apt and and cpan alredy and core wont update.
1
vote
1answer
168 views

Why does my program not execute a perl file

I have a perl file name make_html.pl which works on a module named API::PDF2 (link) I downloaded it installed it and I think I set the path wrong. my @INC has the values Built under linux Compiled ...