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/

Filter by
Sorted by
Tagged with
0 votes
0 answers
46 views

Ubuntu 22.04: perl ExtUtils::Embed is broken for ldopts

Running perl -MExtUtils::Embed -e ldopts results in unusable output: -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.34/CORE -lperl -ldl -lm -lpthread -lc -lcrypt ...
arayq2's user avatar
  • 101
0 votes
1 answer
35 views

Perl: replace literal expression and literal variable names

When I use this expression: echo '...${var}#other.([]);,=${var}#other${var}...' | perl -pe 's/\Q.([]);,=${var}\E/.([]);,=ok/' As expected, the variable ${var} is expanded to "" (empty value)...
Mario Palumbo's user avatar
0 votes
0 answers
19 views

I can not open any programs after install perl-Sys-Syslog package

i used ubuntu 18.04 gui (maybe) i connected this server use ssh and installed perl-Sys-Syslog package to use yum yum install perl-Sys-syslog install was done but something was fail and then i can not ...
강효준's user avatar
0 votes
2 answers
212 views

perl - get non-zero exit code if at least one of the listed files does not exist

As for the cat command, which returns an exit code other than 0 if at least one file in the list does not exist, but continuing its execution, I would also like the same behavior for the "perl&...
Mario Palumbo's user avatar
0 votes
0 answers
168 views

Perl module missing. File :: copy. Ubuntu 22.04 lts

I recently installed unbuntu server on my pc to run a basic web server from my home for personal use. The install went perfectly. I uploaded my cgi files for my site and noticed they were not ...
Tf198's user avatar
  • 1
1 vote
2 answers
220 views

How to delete emojis from Youtube filenames?

Im trying to remove emoticons from this Youtube filename: وسائل الاتصال الحديثة󾌧 📺 & 💻 😃 -eYrBcHOx2Jf.mp4 Im using perl -p -e 's/[^[:ascii:]]//g' and tr -dc '[:print:]' but got this; & -...
s3idani's user avatar
  • 365
1 vote
0 answers
42 views

perl script wont run unless I use perl prefix [duplicate]

I have a weird problem trying to run a simple perl script on ubuntu 22.04. test.pl content: #!/usr/bin/perl print "Hello\n"; output of which perl command: /usr/bin/perl I used to run ...
guygrinberger's user avatar
1 vote
1 answer
177 views

ubuntu cannot find /usr/bin/ld -lperl

/usr/bin/ld: cannot find -lperl collect2: error: ld returned 1 exit status. command used -L/usr/lib/x86_64-linux-gnu/per;/5.30/Core -lperl -ldl -lm -lpthread -lc -lcrypt libtool On the above path I ...
Rajendra's user avatar
0 votes
1 answer
52 views

Error when installing mariadb on Chromebook

I'm trying install wordpress locally on my chromebook following these instructions. I successfully ran: ` sudo apt update sudo apt upgrade sudo apt install nano ` But then get an error when I try to ...
Tyler Knight's user avatar
-1 votes
1 answer
365 views

Why Ubuntu (20.04) doesn't have Perl preinstalled?

https://unix.stackexchange.com/questions/48018/why-is-perl-installed-by-default-with-most-linux-distributions https://stackoverflow.com/questions/1164133/are-there-unix-platforms-where-perl-is-not-...
Andrew15_5's user avatar
0 votes
1 answer
327 views

perl modules missing after upgrading to 22.04

Yesterday I upgraded from 20.04 to 22.04 the upgrade went fairly smoothly. However, after the upgrade, all the perl modules I had installed were no longer installed. Is this because Perl was re-...
Barry Kimelman's user avatar
2 votes
3 answers
552 views

Renaming multiple files by removing a single number (1 & 2) in each file [duplicate]

I have approx 200 files named in the format: paired_dat_11_R1.fq paired_dat_12_R2.fq paired_dat_121_R1.fq paired_dat_122_R2.fq paired_dat_851_R1.fq paired_dat_852_R2.fq I just would like to rename ...
veridian21's user avatar
0 votes
1 answer
70 views

how to show perl printf with decimal as a variable

#!/usr/bin/env bash n=3 awk "BEGIN {printf \"%.\"$n\"f\", (2*2.22222222)}" result: 4.444 but: perl -e "printf \"%.3f\", (2*2.22222222)" how ...
NamPT's user avatar
  • 41
1 vote
0 answers
159 views

perl can't see path problem ubuntu 20.04.4 anaconda

Hi Im trying to run pfam_scan.pl (bioinformatics) Im using conda but theres is perl from ubuntu system... Its conflicts with another? Or script can't see modules? $ pfam_scan.pl Can't locate Moose.pm ...
MTG's user avatar
  • 13
0 votes
0 answers
193 views

unable to locate librrd-simple-perl

I am unable to install librrd-simple-perl. System says it is "unable to locate package...". I am trying to install it on a fresh Ubuntu Server LTS 22.04. Am I missing a repository?
rfl's user avatar
  • 31
0 votes
0 answers
19 views

How to find mentions of a string in all directory files? [duplicate]

I will describe my task: I have a lot of directories with a lot of perl-files. I need to find all files that mention the string "license.key". What ways can this be implemented?
young_protokaa42's user avatar
0 votes
0 answers
428 views

Problem installing Perl module Sys::Info::Driver::Linux

I am running Linux on Windows (Ubuntu) to install a bioinformatics software (MEME Suite - Installation Guide). Please bear in mind I do not have much experience using Linux. I am following the ...
eggrandio's user avatar
3 votes
1 answer
3k views

Trying to update from 16.04LTS to 18.04LTS but unmet perl dependencies or conflicts when updating packages

I've done: sudo apt update But when I do sudo apt upgrade, I get: The following packages have unmet dependencies: perl-modules-5.22 : Conflicts: perl-modules Conflicts: perl-...
Gern B's user avatar
  • 31
1 vote
0 answers
274 views

How to use cpan command to install downloaded perl module (.tar.gz file)

I want to install Sys::RunAlone. I'm not able to install cpanm due to other independent reason, with which I was able to give the downloaded Sys::RunAlone compressed file directly and it installed. In ...
user41965's user avatar
  • 333
0 votes
1 answer
69 views

Can Raku and Perl 5 Run on Same Ubuntu With Switching

I am using a desktop with Ubuntu 20.04. I have Perl 5 installed. I will be installing Raku. Before I install Raku, I want to make sure that I can switch between them, when running a Perl script. Is ...
NW7US's user avatar
  • 1
4 votes
2 answers
1k views

Shutter is complaining about that can't locate Carp/Always.pm in @INC

I made a full upgrade from Ubuntu v18 to Ubuntu v20. Shutter was not upgraded - it was removed. I was trying to install from CRAN or from source. Both complain about old Perl libraries. When I am ...
Estatistics's user avatar
1 vote
2 answers
386 views

reinstall spamassassin (broken perl)

spamassassin was broken on my Ubuntu 20.10 and I can't reinstall it. I have done dpkg --purge spamassassin sa-compile spamc deluser --remove-all-files debian-spamd apt update apt upgrade apt install ...
Pierre ALBARÈDE's user avatar
0 votes
0 answers
83 views

how we can append the data in perl using bash?

i have multiple perl scripts ,currently its working from the shell, but my requirement is like automate this scripts from the bash. perl smtp-check.pl < unmatched-00250 > good_smtp_251 2> ...
Vamshi Krishna CH's user avatar
0 votes
1 answer
182 views

variable substitution

I found this on shell script, in variable substitution option using cap symbols can anyone explain the logic of this nf=${f:gs^__^/^} for f in notes__* books__*; do nf=${f:gs^__^/^} perl -p -...
Vikram 's user avatar
0 votes
0 answers
14 views

Open pl command [duplicate]

This is probably pretty basic but I have not been able to solve it. I am trying to execute IDrive for Linux, and following the instructions I need to run account_setting.pl. I open the terminal ...
Skypilot's user avatar
1 vote
2 answers
350 views

Problem with Perl installation on Ubuntu 20.04

I am an inexperienced user. I have two different bioinformatics applications using different Perl libraries. I get the following error when trying to execute one of them: /usr/bin/perl: symbol lookup ...
Karenv's user avatar
  • 13
-1 votes
1 answer
47 views

How to handle format in perl?

I want to write the number in two decimal using Perl script. Here is my code. #!/usr/bin/perl -w print "Preparing input files\n"; $incr=0.10; &prepare_input(); exit(0); sub ...
sacky0003's user avatar
0 votes
1 answer
139 views

for loop issues, ls not working right

I have a code that has to be run through Ubuntu. When my code reaches filelist, instead of giving all of the subfolders within the filelist, it gives the same list as from the subjectlist... why is ...
ABABABABABABBA's user avatar
0 votes
1 answer
668 views

nginx hangs if "reload" 2 times

If you execute "service nginx reload" 2 times (this also works with any commands that execute "reload", for example systemctl reload nginx.service) - nginx hangs and stops ...
Александр Бондаренко's user avatar
1 vote
2 answers
60 views

Append multiple digits to the end of eatch lines

i need to cat temperature values in /sys/class/hwmon/hwmon[0-9]/temp[0-9]_input and append them to the corresponds names in given file. help !
s3idani's user avatar
  • 365
0 votes
2 answers
510 views

WSL Ubuntu why does cpanm install Perl5 modules in the wrong spot?

I have Ubuntu installed under Windows Subsystem for Linux 2 (WSL2). There are Perl5 modules installed under /usr/share/perl/5.30.0 and I can access these with a plain use statement. But when I install ...
Steve's user avatar
  • 293
0 votes
2 answers
313 views

I can launch a Perl script with cron, but can I make it open up a window?

I have an Perl script that runs all night, through a terminal window (Win10 putty.exe) on my Ubuntu server. As with many home networks, I occasionally lose my internet connection, which kills my ...
Daniel Kaplan's user avatar
2 votes
2 answers
3k views

replace text with part of text using regex with bash perl

For example I have this output: string1 anynameveryveryverylong string2 string1 othernameveryveryverylong string2 I want truncate the name to the first ten characters: string1 anynamever string2 ...
Mario Palumbo's user avatar
0 votes
1 answer
200 views

Can I stop SSH Terminal window, into Ubuntu command line, from closing on error in Perl script?

My apologies if I am in the wrong Stack section, if I am please just let me know and I will delete this post. I am running Perl scripts on my Ubuntu server, 18.04. I run them from my Mac and PC. One ...
Daniel Kaplan's user avatar
3 votes
3 answers
208 views

bash perl \z doesn't work

I have this text file or sdout: text1 text2 text1 text2 text1 text2 I have this code: perl -pe "s/text2\n\z/text3/s" text.txt #Note the modifier "/s" I with \z expect him to ...
Mario Palumbo's user avatar
-2 votes
2 answers
915 views

Replace only last occurrence of a string using perl command

I have a stdout or a file does not matter: mela pera banana caffè mela pera banana caffè mela pera banana caffè I want remove only last occurrence of "mela" using perl: mela pera banana ...
Mario Palumbo's user avatar
0 votes
1 answer
740 views

Install perl 5.10.1 on Ubuntu 18.04

I am trying to install an old version of perl (5.10.1) since it is a dependency for software I want to use (and newer versions do not work). I downloaded the source from https://www.cpan.org/src/...
CoderGuy123's user avatar
0 votes
1 answer
2k views

Ubuntu 20.04,1 failing to install perl modules

for example File::Slurp Reading '/root/.cpan/Metadata' Database was generated on Sun, 06 Dec 2020 19:29:03 GMT Running install for module 'File::Slurp' Checksum for /root/.cpan/sources/authors/id/C/...
user2037986's user avatar
0 votes
0 answers
154 views

Make issue in Ubuntu 20.04

I have a "make file" to install some files, which will highlight syntax in gvim. It was downloaded from Github, for reference. When I attempt to install it was showing some error: "let ...
SriGanesh D's user avatar
0 votes
3 answers
126 views

Re: How can I escape meta-characters when I interpolate a variable in Perl's match operator?

The link How can I escape meta-characters when I interpolate a variable in Perl's match operator? didn't help me. I have tried with Python: import os line='ID_SN=02 MS=DC:A6:32:7E:74:08 S=* ...
Mario Palumbo's user avatar
0 votes
1 answer
818 views

perl command: Append a line of text only at the first occurrence

I have this input file: text1 match text2 match text3 I have the command that inserts a line before the match: perl -lpe 'print "prepend_me" if /^match$/ && ++$i == 1' text.txt And ...
Mario Palumbo's user avatar
1 vote
2 answers
519 views

perl command: Prepend a line of text only at the first occurrence

I have this input file: text1 match text2 match text3 And I have this command: perl -lpe 'print "prepend_me" if /^match$/' text.txt And its output is: text1 prepend_me match text2 ...
Mario Palumbo's user avatar
1 vote
1 answer
1k views

Perl Module Location Issue

I'm on Ubuntu 20.04 LTS. I ran the following commands to try to connect to my PostgreSQL database: sudo -i -u postgres postgres@{username}:~$ psql This raised the following error: Can't locate ...
Noam Hudson's user avatar
0 votes
1 answer
121 views

bash perl "and" operator

with a output: apple text1 peach text2 banana text3 melon text4 For delete rows that begin with "apple" or "banana" i put: perl -pe 's/^apple.*\n|^banana.*\n//g' And output is ...
Mario Palumbo's user avatar
4 votes
2 answers
915 views

bash --> perl command: print only the replaced text

I have the file "test.txt" that contains: Val1 = '59' Val2 = '76' Val3 = '42' Val4 = '53' I with this command: perl -pe "s/^Val2 = '(.*)'/\1/" test.txt I Want: 76 But I obtain: ...
Mario Palumbo's user avatar
0 votes
0 answers
169 views

Where can I find the system log files on my ubuntu 20.04.01 LTS system

My system is a ubuntu 20.04.1 LTS system I am working with some perl scripts that use Sys::Syslog to write to the system log. My questions are : Where are the log files that contain these written ...
Barry Kimelman's user avatar
2 votes
1 answer
6k views

perl install DBD::mysql failed on ubuntu 20.04

I have installed the latest mysql database on my ubuntu 20.04 laptop. Next I tried to install all the perl modules I need to write Perl scripts to access my mysql database. I started a "sudo -i&...
Barry Kimelman's user avatar
3 votes
0 answers
2k views

How to install slurm-seff in Ubuntu [duplicate]

I am trying to install Slurm-seff Perl package into Ubuntu 19.10. It has .rpm package to install https://pkgs.org/download/slurm-seff ; but I am unable to install alien to install the .rpm package. ...
alper's user avatar
  • 232
0 votes
2 answers
607 views

What Ubuntu 20.04 package gives the Perl module Locale::Language?

What Ubuntu 20.04 package gives the Perl module Locale::Language? I've looked on https://packages.ubuntu.com/ but I can't find anything. Web search isn't turning up anything. Not sure I'm searching ...
Borea Deitz's user avatar
3 votes
2 answers
698 views

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/...
Brian Wiley's user avatar

1
2 3 4 5
7