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
1 answer
175 views

Dependency is not satisfiable: libgtk2-perl

I am trying to install gmusicbrowser in ubuntu 22.04 but sadly I am getting the below errors. I have sudo apt install libglib2.0-dev in a blind hope it might install perl, but no such luck. sudo gdebi ...
Jamie Hutber's user avatar
0 votes
1 answer
53 views

preint and postrm scripts are not running showing as access denied

root@XXXXXXXXXX:/home/user# apt install /var/cache/apt/archives/perl_5.36.0-7 ubuntu0.23.04.2_amd64.deb Reading ...
Anji Rapeti's user avatar
1 vote
1 answer
7k views

Unable to install php8.2-dev on ubuntu 20.04

I'm trying to install swool using perl on ubuntu server then i get bellow error: ERROR: `phpize' failed As i searched turns out i should install php-dev but then i got below errors: The following ...
kosar's user avatar
  • 11
0 votes
1 answer
180 views

Bash script does not recognize commands (Perl and Python scripts)

I have this script in bash inside which is defined to use perl and python for subprograms that need to analyze my data. Script is executing fine until Step3 and Step4 and crashes with command not ...
Maja Mucko's user avatar
0 votes
0 answers
142 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
  • 141
0 votes
1 answer
192 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
2 answers
340 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
1 vote
2 answers
339 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
280 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
68 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
737 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
709 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
839 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
78 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
184 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
  • 113
0 votes
0 answers
268 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
21 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
493 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
4k 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
419 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
75 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
491 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
1 answer
195 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
409 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
144 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
787 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
62 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
631 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
  • 303
0 votes
2 answers
336 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
204 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
211 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
1k 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
801 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
159 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
144 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
939 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
620 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
2k 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
133 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
1k 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
194 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
4 votes
1 answer
7k 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
  • 222
0 votes
2 answers
782 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

1
2 3 4 5
7