Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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/

0
votes
1answer
8 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
0answers
69 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
0answers
26 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
1answer
20 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
1answer
16 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 ...
-1
votes
2answers
99 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
0answers
12 views

After 18.04 upgrade, logwatch error in rsnapshot script?

Since upgrading from 16.04.5 to 18.04.1, I have been noticing errors reported by logwatch about the rsnapshot script. Specifically, it reports: syntax error at /etc/logwatch/scripts/services/...
0
votes
0answers
677 views

Issu when installing webmin on ubuntu server 18.04 [duplicate]

I just installed ubuntu server 18.04 and i'm getting this error when I install webmin by using sudo apt install webmin : Reading package lists... Done Building dependency tree Reading state ...
0
votes
0answers
44 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? ...
5
votes
3answers
1k 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
1answer
140 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
1answer
82 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-...
0
votes
0answers
166 views

upgrade from 16.04 to 18.04 - mod_perl seems to now be failing

My cgi perl scripts are now being displayed as text files instead of executing. apache2ctl configtest shows no syntax errors everything was fine before the upgrade. Any suggestions for further ...
2
votes
1answer
386 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
3answers
132 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
1answer
401 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?
0
votes
0answers
400 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 ...
1
vote
1answer
32 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....
11
votes
1answer
694 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 ...
4
votes
3answers
121 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
0answers
194 views

Use of awk command in perl script is throwing error

I'm comparing 2 files for duplicates cat file1 ac-list hostname permit tcp host 110.185.35.111 host 10.185.38.220 eq 1222 cat file2 ac-list hostname permit tcp host 10.185.35.111 host 10.185.38....
0
votes
0answers
103 views

My bugzilla install no longer works under 17.10

Since upgrading Ubuntu from 17.04 to 17.10 I have not been able to use my installation of Bugzilla. Once I log in I get 'Internal Server Error' with no helpful information as to the cause. When I run ...
0
votes
0answers
57 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
1answer
207 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 ...
0
votes
0answers
86 views

installing via internet with install.pl

I have expanded a file for an installation file called install.pl. But, I cannot execute this file. perl install.pl results in "Can't open perl script "install.pl": No such file or directory". sudo ...
0
votes
1answer
768 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: ...
13
votes
5answers
2k 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 ...
0
votes
0answers
383 views

Installing Perl scripts - can't locate WWW/Mechanize.pm [duplicate]

I tried installing Perl scripts and the same procedure worked perfectly with Kali but in Ubuntu MATE it's giving me this error.
0
votes
2answers
365 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
1answer
67 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
1answer
41 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 ...
12
votes
1answer
320 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 ...
1
vote
1answer
2k views

Cannot load cgi-library into perl-cgi-script

I'm trying to run a perlscript as a cgi-Script. However including the cgi-library of perl doesn't work: # perl -e 'use CGI::Carp qw(fatalsToBrowser);' Can't locate CGI/Carp.pm in @INC (you may need ...
1
vote
0answers
88 views

Find what version of specific perl packages available per ubuntu release

I'm in need of knowing what module version a certain perl package (e.g. Net::Cmd) is available in different Ubuntu versions. I'm currently on 16.04 and need a later version of Net::Cmd to resolve (...
0
votes
1answer
87 views

How can I save a log of an Ubuntu server terminal on an external PC using SSH?

I am using a script to automatically log in to a server: #!/usr/bin/perl use Net::SSH::Perl; my $host = "hostname"; my $usr = "my userid"; my $pwd = "my password"; my $ssh = Net::SSH::Perl->new($...
3
votes
2answers
3k views

How do I install asciiquarium?

How do I install and run asciiquarium in Ubuntu? It seems kind of complicated, and I don't know how to compile source code.
1
vote
1answer
71 views

Shell How install local bulk of packages [duplicate]

I have 20 or 30 deb files within a folder in a local directory, lets say /home/Downloads. Given that the amount of files may vary, I need a script(or command or whatever) which installs all these .deb ...
1
vote
1answer
507 views

Getting error “Perl may be unconfigured” when trying to install dependencies

I'm new to ubuntu, currently using ubuntu 17 and trying to run sudo apt --fix-broken install because i have this red error thing showing up close to my network indicator at the top saying "An Error ...
1
vote
2answers
339 views

Open linux terminal and run multiple tasks using perl script

I am running these commands in perl script with purpose Open a linux terminal Run script xbrecoverBoard.sh and rest_board.sh in that terminal gnome-terminal -x sh -c "./xbrecoverBoard.sh && ....
0
votes
2answers
252 views

How to delete directory content that is older than one day with perl in crontab

As mentioned in title, i'm trying to delete files that are older than one day inside a directory with many many files (without actually deleting the said directory) - the directory is backed up by a ...
2
votes
2answers
6k views

Unable to install postgresql 9.6 on Ubuntu 15.04

To install postgresql 9.6 on Ubuntu 15.04, I have followed steps from here and here I am getting this error while installing. Preparing to unpack .../postgresql-contrib_9.6+180.pgdg16.04+1_all.deb ....
0
votes
0answers
134 views

how to use awk in perl?

Looking to convert following unix command in perl? grep TMP_RULE $i | grep -oP 'TMP_RULE\s*=\s*"[^"]+' | awk -F " " '{print $3}' | sed -e 's/\"//' | sort -u >>x.list Above code returns me the ...
-2
votes
1answer
687 views

I want to search particular files from directory in perl [closed]

Need file pattern search(in perl), something like $fileName =~ / /. Specif filename examples: YYYY-MM-DD_AmdocsWebHourlyReport.csv.gz YYYY-MM-DD_ComverseHourlyReport.csv.gz YYYY-MM-...
2
votes
2answers
1k views

Padre for Ubuntu 16.04

Im trying to install Padre (Perl IDE) on Ubuntu using command sudo apt-get install padre But I get: Reading package lists... Done Building dependency tree Reading state information... Done ...
2
votes
2answers
174 views

error for not using bash?

I am trying to install a software which has no support so far. The software is from here http://proteomics.ethz.ch/cgi-bin/xquest2_cgi/installation.cgi This is what they mentioned to follow: [...]...
1
vote
1answer
4k views

ubuntu 16.04, How to downgrade Perl from version 22 to version 20

I have perl V5.22.1 installed by default in ubuntu 16.04 , I would like to know how to downgrade perl to version 5.20.3 , I have used perlbrew but it doesn't seem to work properly , are there any ...
0
votes
1answer
298 views

cannot run strict.pm inside su for perl installation

I am trying to setup Postgres for a project. In the instructions it says to run psql: $ psql Can't locate strict.pm: /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/strict.pm: Permission denied at /usr/...
0
votes
1answer
669 views

How do i run a perl script (possible missing dependencies)

I'm trying to use this little script because my cat loves walking on my keyboard. http://linux.softpedia.com/get/Utilities/Lock-keyboard-for-Baby-23745.shtml I just installed Ubuntu16.04 and don't ...
0
votes
0answers
293 views

Can not start postgresql due to perl error

I have installed postgres on my Ubuntu, when I try to run the psql command I am getting following error: $ psql Can't locate POSIX.pm: /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/POSIX.pm: ...
1
vote
1answer
113 views

Perl script to chop input and start a new line after a certain number of instances

I have a perl script to convert a text file to json. The script looks like this: perl -MJSON -F, -lane ' print to_json ({ domain => shift @F, emails => [map {{email =...