Questions tagged [perl]

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/

Perl is optimised for scanning arbitrary text files and system administration. It has built-in extended regular expression matching and replacement, a data-flow mechanism to improve security with setuid scripts and is extensible via modules that can interface to C libraries.

319 questions
22
votes
5 answers

How do I update/install Perl?

The Perl package is in /usr/bin and is an older version (5.12.4). 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 compile new binaries to install in a directory that is in…
Robert
  • 349
3
votes
2 answers

Deleted /usr/share/perl/5.26 because I had /usr/share/perl/5.26.1 folder

Being new to perl and its versions, I thought it worked like R but OBVIOUSLY not. I had folder /usr/share/perl/5.26.1 folder and /usr/share/perl/5.26 folder both with same files so I deleted /usr/share/perl/5.26 folder. Everything was okay. When…
3
votes
2 answers

loadable library and perl binaries are mismatched

I don't use perl, but I do use Slic3r, which apparently uses perl. I don't know what has done it, but some update somewhere has broken perl and I have no idea how to fix it. I've searched a lot but most of the 'solutions' I've found assume some…
2
votes
0 answers

Perlbrew and libperl-dev

I have Perl running under Perlbrew, meaning my local Perl is 5.24.0. However, I'm getting errors compiling some projects from source because my libperl-dev package is only 5.22.1. Are there any PPAs or repos that have a more up-to-date libperl-dev…
2
votes
2 answers

Ubuntu 14.04 LTS - what version of padre should I use?

I am a new, not experienced user and just installed Ubuntu 14.04 LTS. What version of padre should I use ? Any recommended sources ?
trev
  • 29
  • 1
2
votes
1 answer

Why does Perl always need the "-p" option to be given even when the input file is stdin?

Update #2: I had a great missunderstanding about the -p option, now it's clear to me that it's used to process all the files provided as an argument, but I still don't quite understand why this is needed when reading the input from stdin. Update…
kos
  • 35,891
2
votes
2 answers

Output of a Perl one-liner

I have a perl one-liner: perl -pe 'while (/((\(.*?[^)]\))|(".*?"))/g) {print "$1 ";} print "\n"' testdata The file testdata contains the following: "123" (123) 123 Ouput is: "123" (123) "123" (123) 123 But I need: "123" (123) What can I do?
A.B.
  • 90,397
2
votes
2 answers

Cannot install Perl Modules on Ubuntu 18.04

I am new to Ubuntu, and for some reason I cannot install any Perl modules. This is my first module install attempt, I believe, fix this and it fixes the rest. hopefully! $ cpanm AnyEvent Can't write to /usr/local/share/perl/5.26.1 and…
Cougar
  • 119
1
vote
1 answer

How to read multiple files in a directory by matching a pattern?

I have a directory containing 'x' no. of files. Some files contain a "Pass" string and some others with "Fail". I want to read both files and store the pass and fail files separately into two different directories. I am able to read the files but…
nani
  • 25
  • 5
1
vote
1 answer

Perl script error : 'script executable not found'

I am trying to execute a perl script from Ubuntu (14.04 LTS). The script is transOutput.pl which calls an executable pdb_trans. However, when I run the script, I get the following error that pdb_trans is not found - see…
1
vote
1 answer

problem Gunzip a file in perl

I have below file: 9001_20150918165942_00085.xml.gz I want to gunzip it "9001_20150918165942_00085.xml", how can I do it in perl. Regards, Bhushan
Bhushan Patil
  • 23
  • 1
  • 4
1
vote
1 answer

Is there a way to force Perl to always use the latest version?

This is in relation to this question: Why doesn't Perl use latest version by default? I'm aware that I can force it with use v5.14 from within a script, and that's what I'm currently doing, but I'd like to force the interpreter itself to use the…
felwithe
  • 262
1
vote
2 answers

Permission denied running perl

perl 5.18.2 was running fine on my Ubuntu 14.04 system until I needed a package from CPAN which did not exist as an Ubuntu package. I installed it as root and it didn't work but then the installation process seems to have changed permissions of…
Ray
  • 2,071
1
vote
1 answer

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 version. 0 upgraded, 0 newly installed, 0 to remove…
1
vote
2 answers

How can I install Uniscan on Ubuntu 13.04?

When I try to run uniscan.pl with perl ./uniscan.pl, I get this message: Can't locate Moose.pm in @INC (@INC contains: ./Uniscan /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5…
Nidhal Hack
  • 21
  • 1
  • 3
1
2 3