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/
319
questions
3
votes
2
answers
758
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/...
2
votes
1
answer
604
views
Rmarkdown can't install Tinytex
I can't see to get this to work. I installed miktex using instructions at https://miktex.org/howto/install-miktex-unx. I installed with install.packages('tinytex') and then when I do tinytex::...
0
votes
1
answer
135
views
is there something like brace expansion when using perl rename?
I have 100's of files that I want to remove the beginning numbers from. The files are named similar to below:
048banana.txt
049pear.txt
050watermelon.txt
051tomato.txt
062pepper.txt
...
1
vote
1
answer
4k
views
Environment Modules can't find installed modules
I'm trying to install and load several Perl modules in Google Colab (a Ubuntu environment). I'm installing them with CPAN, then loading them with Environment Modules. I absolutely need to use ...
0
votes
0
answers
632
views
Perl Libraries configuration, conflicts
I'm having troubles with Perl in my server machine I'm not an admin, but I assume I have created my environment, it was working just fine until I installed Conda.
I install Perl using brew so it can ...
2
votes
1
answer
694
views
libsnmp-perl 20.04 can not install
I can not install package libsnmp-perl.
I hope that the text I pasted is helpful.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
Using sudo apt-...
7
votes
0
answers
240
views
Nautilus shortcut for "Open in Terminal" and gvfs
I am trying to assign a shortcut to "Open in Terminal" in Nautilus. I have implemented the solution here with nautilus-scripts and the Perl file.
While this solution works well for local ...
0
votes
1
answer
2k
views
Odd number of elements in hash assignment at /usr/share/pkg-config-dpkghook when adding an architecture for cross-compliation?
Someone suggested that I run sudo dpkg --add-architecture armhf to add cross-compilation to my x86_64 box running Ubuntu 18.04 LTS, but it doesn't appear to work:
$ sudo dpkg --add-architecture armhf
...
0
votes
1
answer
153
views
How to add . in @INC in perl in ubuntu desktop 18.0.4
As the title says i'm looking for a way to do so, i'm using ubuntu/linux for the first time and i had already tried environment variables etc but none of them worked for me. So it would be great if ...
0
votes
0
answers
448
views
Software Center got removed by uninstalling Perl
I tried to uninstall Perl from my Ubuntu 18.04.3 LTS by the command-
sudo apt-get remove --auto-remove perl
Due to this command Software Center app is removed and won't reinstall by install software-...
3
votes
2
answers
8k
views
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 ...
8
votes
3
answers
950
views
How can I change ^L code in many files in Ubuntu?
I have a lot of XML files, over 50000 of them.
In some XML files, some files are written like this
<filename>abc.JPEG<^Lilename>
^L is just one character, but I can't find what ^L means ...
1
vote
1
answer
454
views
How to remove "." from a filename in Perl?
I do /(\.[^.]+)$/ in Perl to read the extension of a file, for example Text.txt. How can I remove the . so that the output gonna be Texttxt?
2
votes
2
answers
8k
views
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 ...
1
vote
1
answer
88
views
How to replace and edit content of file?
I have a file which contains the following content:
set0027:
set0027_100-250
set0027_1-150
set0027_50-200
set0038:
set0038_100-250
set0038_1-150
set0038_50-200
I want to modify it in the following ...
1
vote
1
answer
3k
views
Install perl to /usr/local/bin
Is it possible to install perl to /usr/local/bin without full sudo permissions
namely only sudo apt install ... being allowed.
I have a DVD with a software, using /usr/local/bin/perl in shebang, ...
1
vote
1
answer
314
views
How to create a directory and store its name in a value?
I want to create a directory and I want to print the directory as a name.
My code is as follows:
#here $directory = www(subdirectory name)
#in @missingfiles I have 1 gif and 1 html file.
my @...
3
votes
1
answer
347
views
Is there a way to install a2p on Ubuntu?
I need a2p to convert a bunch of awk scripts, but starting with Xenial the perl package does not come with a2p any more.
Where can I get a2p from?
0
votes
1
answer
2k
views
how do i fix this Switch.pm in @INC
I am trying to install NIPE on ubuntu running on my Windows 10 using Windows Subsystems For Linux, I have cloned the file from GitHub and have done some commands which worked, but the command to fully ...
1
vote
2
answers
1k
views
Unterminated quoted string (Perl)
I am using a new version of perl to run some old script. This is my perl version:
This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi (with 67 registered ...
-1
votes
5
answers
137
views
comparing the content and produce new file
I have two files containing content like the following:
File 1
OG5_126568
OG5_126583
OG5_126593
OG5_126596
OG5_126599
OG5_126609
File2
OG5_126568 psychrobacter_aquaticus.txt WP_021813339.1
...
4
votes
3
answers
740
views
How to replace the content to multiple files?
I have multiple files containing content like the following:
File 1
NC_12548 og789 |nd784 -2 -54 -6
NC_12548 og789 |nd784 -2 -54 -6
NC_12548 og789 |nd784 -2 -54 -6
File2
NC_54456 og789 |...
0
votes
1
answer
166
views
How to replace consecutive characters from directory names, recursively
What is the best way to replace all consecutive characters such as _+-."'? from a directory and all sub directory's names using GNU bash, version 4.3, using tools awk, sed, Perl rename or find?
AS ...
0
votes
0
answers
120
views
Extract specific field in matrix
I am trying to extract some fields from a .txt file to generate another table. It is a matrix (size varies time to time) separated with ; (further by \ in header), each field can have >= 1 numerical ...
0
votes
1
answer
290
views
Perl Make GLOB ignore case
How can i make the following line ignore case
perl -MFile::Glob=:bsd_glob -lne 'unlink glob' -- /volume1/<file.list
I tried experimenting with GLOB_NOCASE but i might be placing it wrong or it ...
1
vote
0
answers
600
views
Converting a string of Perl code to BASH code
I have this string of Perl code (which i didn't write) that it would be awesome if is converted to BASH code:
perl -pe '$j=0; while ( s{.{$j}\K(\d+):}{/} ) {$j += $1+1}'
By using it in terminal:
...
0
votes
0
answers
188
views
Trying to create a archive tester for rar and 7z in perl
i'm trying to create a archive tester for a directory for rar and 7z in perl, my 7z can't handle rar and i can't install the rar function for 7z.
I borrowed a PERL script and adjusted it for rar ...
2
votes
2
answers
1k
views
Install fbmenugen: where are the perl-linux-desktopfiles and the perl-file-desktopentry dependencies
I found this nice script for generating the menu on fluxbox: https://github.com/trizen/fbmenugen
But for my needs I need to find the libraries perl-linux-desktopfiles and perl-file-desktopentry. Do ...
0
votes
1
answer
265
views
Can I give the default user that runs Perl scripts from cgi-bin different permisions?
The default user that Perl scripts run from browsers is www-data. My scripts need permission to read/write/delete files in other directories. All these directories are created within the /home ...
0
votes
1
answer
4k
views
How to install all the perl modules in Ubuntu at once
I want to install LWP::UserAgent. I tried by using metascan manual method. but it has ~50 depedencies.
I was installing RepeatModeler by using the command perl ./configure
But I get:
The following ...
-1
votes
2
answers
3k
views
Insert a line of text after the line containing the last occurence of a specified word
Basically, I want to insert a line of text after the line containing the last
occurence of a specific string, without affecting the rest of the file.
I imagine I should proceed like this:
delete ...
0
votes
0
answers
483
views
Unable to install tightvncserver on Ubuntu 16.04
Hi is there anyone encounter this error before? I have tried many ways removing and reinstall etc, but it still just don't work. Is it because there is another version of PERL exist on the server? ...
6
votes
3
answers
4k
views
How do I carry my variables from a Bash script into a Perl one?
I have variables in a bash script that I need to be carried over into a perl one. I have the variables $gal and $obsid declared in the bash script, and then I call the new program.
gal=UCLA121
obsid=...
2
votes
1
answer
518
views
How to make youtube-viewer zip package installable for 18.04
I've recently upgraded to 18.04 and miss youtube-viewer which is not in the repo (yet??). This thread has an answer in which the poster says they got it working by downloading youtube-viewer-master....
2
votes
1
answer
178
views
Add minutes to date time column
Thanks to various contributors resolving my previous request.
I need to add minutes to the date column to get new datetime stamp value. I have a file : afile.txt
1,2012-02-16,abc,aa,455,340
3,2015-...
3
votes
1
answer
6k
views
Cannot assign address inside a Docker container
I want to use the rsub package for Sublime Text, in order to edit code inside a Docker container which runs on a remote server. However when I execute
rsub my_code.py
I get the error:
/usr/local/...
1
vote
3
answers
257
views
echo first group in perl
Is there a more elegant perl command for this?
ps -ejH | grep 'bash' | head -1 | perl -E ' if( <> =~ /(bash)/) {say $1}'
I just want to echo the PID which is the first group of chars.
0
votes
1
answer
2k
views
Ubuntu 16.04, how to downgrade perl 5.22 to version 20 system wide
Perl 5.22 deprecated defined arrays. Got a cgi-bin that's not working as a result. How do I downgrade perl to 5.20 system wide?
2
votes
0
answers
3k
views
Error Perl after upgrading
After upgrading from 17.04 to 17.10 I tried to use my program as usual which require Perl but I got this error:
Encode.c: loadable library and perl binaries are mismatched (got handshake key ...
0
votes
1
answer
51
views
Putting a newline whenever it match third space
I have a data that looks like this :
8.620 -9.182 1.758 8.786 -8.249 -0.495 8.614 -9.652 -1.158 9.446 -9.278
0.350 11.450 -7.809 0.887 10.638 -9.000 2.070 11.179 -10.871 -1.200 7.583
-10.330 0....
10
votes
1
answer
775
views
Is it possible to implement a "name" booking system using linux file permissions
I have a linux multi user server with 100+ users in /etc/passwd
I would like to allow users to "book" / "reserve" a name of their liking (in this case a subdomain, but that details doesn't matter)
I ...
3
votes
3
answers
316
views
Extract a number which is assigned to a string using a Perl script
I have a file input.txt which has some strings and each string has some values assigned to it.
My task is to write a Perl script to extract the number which is assigned to any of the strings.
For ...
0
votes
0
answers
121
views
Syntax error running shutter and apt. Suspect perl has something to do with it
I am getting a really strange error running apt and some other programs. I think it may have something to do with perl.
I discovered the issue trying to run shutter:
$ shutter
syntax error at /usr/...
2
votes
1
answer
1k
views
cpan / perl messed up
Lubuntu Xenial. I seem to have messed up my system perl.
cpan returns:
bash: /usr/local/bin/cpan: no such file or directory
(I built a newer perl version from source in that directory, but removed ...
2
votes
1
answer
2k
views
Perl locale setting warning
What should I do to fix this locale setting warning? I have searched already the web but I am a newbie and I am a bit lost...
edwin@ubuntu:~$ perl -e exit
perl: warning: Setting locale failed.
perl: ...
14
votes
5
answers
3k
views
Unable to find ack in Ubuntu 17.10 repositories
I am trying to install ack via apt but it seems it's no longer available in the repos. Both:
sudo apt install ack
sudo apt install ack-grep
give the following error:
E: Package 'ack-grep' has no ...
1
vote
2
answers
7k
views
PATH, removing old versions from usr/bin
I'm new to Ubuntu. I inherited a computer from another person. She installed many small programs for bioinformatics in the root folder and /usr/local/bin.
I need to be able to remove the old versions ...
0
votes
1
answer
103
views
Saving output from external command!
I'm not really how to ask this question the right way without being long winded, but will do my best!
I need a script I'm writing to run pidstat -V inside of it and then to capture the output from it ...
-1
votes
1
answer
69
views
pidstat and perl!
I hope I phrase this question correctly.
I want to write pidstat into a perl script so that when a user runs it he/she is asked for a PID the script then runs pidstat with that specific PID and ...
15
votes
1
answer
2k
views
What's the difference between the different "rename" commands?
Since Ubuntu 14.04 there are at least three rename commands:
rename provided by the util-linux package, see man rename.ul
rename provided by the perl package, see man prename
rename provided by the ...