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
5 votes
2 answers
11k 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 ...
linuxbasher's user avatar
1 vote
0 answers
231 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 (...
Craig's user avatar
  • 11
0 votes
1 answer
258 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($...
popeonhabbo123's user avatar
20 votes
3 answers
31k 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.
Curtice Gough's user avatar
1 vote
1 answer
436 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 ...
Krlos9108's user avatar
1 vote
1 answer
2k 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 ...
Mubarak Awal's user avatar
1 vote
2 answers
1k 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 && ....
tpham1002002's user avatar
2 votes
2 answers
2k 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 ...
deltagreen88's user avatar
2 votes
3 answers
15k 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 ....
Hiren patel's user avatar
-2 votes
1 answer
2k 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-...
Sonal's user avatar
  • 47
2 votes
2 answers
2k 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 ...
tomsk's user avatar
  • 1,315
2 votes
2 answers
240 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: [...]...
Moh's user avatar
  • 41
2 votes
1 answer
12k 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 ...
DevanDev's user avatar
  • 177
0 votes
1 answer
1k 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/...
Chaz Bassett's user avatar
0 votes
1 answer
2k 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 ...
SailaNamai's user avatar
0 votes
1 answer
1k 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: ...
Anil Bharadia's user avatar
1 vote
1 answer
243 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 =...
Jaffer Wilson's user avatar
1 vote
1 answer
2k views

How to use system command in a perl script with sudo?

I would like to use this in my perl script: sudo killall -HUP tor would this work?: system echo sudo killall -HUP tor Also how would I get around having to authenticate when running the script/...
user2829148's user avatar
1 vote
1 answer
2k views

i want to remove the line breaks in a text file using perl script

can this be achieved using perl one liners?
Khan's user avatar
  • 11
0 votes
1 answer
252 views

I have installed libdbd-mysql-perl on ubuntu 14 and I get a crazy Version required

Error message: DBI version v10.0.33.6 required--this is only version v1.636.0 at /usr/share/perl/5.18/Exporter/Heavy.pm line 106. Given that v1.636.0 is the latest version I REALLY cannot get a ...
Cammi Mitchell's user avatar
0 votes
2 answers
159 views

I have a file. I need to print all the quantities with unique values no duplicates, using perl

In example below, quantity is the field with the '38' tag, e.g. 38=100 on the first line. Order:167342,9=205|21=1|553=2453|49=11342|56=MBT|10=085|55=/GCQ3|1=30532|114=Y|40=1|35=D|54=|60=20130624-09:...
Sonal's user avatar
  • 47
3 votes
1 answer
1k views

process over records of files based on timestamp in x interval of the time

I have a file with part of that as sample like below, which contains a timestamp field: 20161203001211,00 20161203001200,00 20161203001500,102 20161203003224,00 20161203001500,00 20161203004211,00 ...
αғsнιη's user avatar
  • 35.7k
0 votes
2 answers
246 views

Perl rename command regex working weirdly with groups and hyphen

I am trying to rename a bunch of file with rename perl utility My replace string expression is s/(\d)(?:-|_)*([A-Z]+)(?:-|_)*(\d+[A-Z]{0,2})(?:-|_)*([A-Z]{2})/$1-$2-$3-$4/. I don't know much of perl ...
imbr's user avatar
  • 164
0 votes
1 answer
419 views

getting error installing miRDeep2

I am trying to install miRDeep2 on Ubuntu 14.04 using perl install.pl command as is suggested in "read me" file of the software. But I get the warning message below: Warning: prerequisite Font::TTF 0 ...
Karim's user avatar
  • 13
2 votes
1 answer
17k views

Perl Cannot Find Module XML/Simple

I my attempting to run a Perl script on Ubuntu 14.04.02 LTS. The script looks like this: #!/usr/bin/perl5.18.2 use warnings; use strict; use XML::Simple qw(:strict); use Net::Telnet(); I get the ...
xBACP's user avatar
  • 123
2 votes
1 answer
2k views

perl: warning: Falling back to the standard locale ("C")

I get the following errors from perl: perl: warning: Falling back to the standard locale ("C"). Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16. Use of ...
Michael Chen's user avatar
1 vote
0 answers
73 views

Ubuntu 14.04/Serverpilot running CGI Scripts

Got an odd Serverpilot query. My client wants FTP access to a subfolder on the site - loathe to let them have full access so created a user with access to /home/FTPUSER and symlink to this from my /...
Cole Henley's user avatar
0 votes
1 answer
2k views

Why does my Perl script work fine in Windows but not in Ubuntu?

My Perl script works fine in Windows command line;but, I couldn't run it in Ubuntu. I tried with a simple Perl script but it is giving me error message: can't open perl script "testl.pl" inpute/...
Kiflu's user avatar
  • 1
-1 votes
1 answer
790 views

While cloning from git i get: perl: warning: Setting locale failed

My OS is Linux Ubuntu Desktop 16.04. I used this command to clone files from git server: $ git clone basecamp:some_acount and getting this warning: Cloning into 'some_acount'... perl: warning: ...
Vova Polischuck's user avatar
5 votes
2 answers
2k views

How to compare 2 files and extract the particular sequence using ID in first file and print the out put

File 1 (contain only selected IDs): AAX50250 AAX50251 AAX50252 AAX50253 AAX50254 AAX50257 AAX50258 File 2 (Contains sequences with the IDs). This is a FASTA file where lines beginning with as > ...
Nitha's user avatar
  • 51
2 votes
0 answers
109 views

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 ...
Comrade_Question's user avatar
1 vote
0 answers
93 views

.desktop invoking perl and terminal blinks on and off without running; yet runs fine using EXEC line in terminal

My problem is getting a .desktop file that runs a script with parameter(s) in a terminal to stay open rather than blink on and off, presumably taking with it the error messages I need. I show some ...
Mike W.'s user avatar
  • 11
1 vote
0 answers
763 views

segmentation fault when i upgraded to 16.04 from 14.04

I did an upgrade from ubuntu 14.04 to 16.04. After the upgrade, I wrote a very simple perl program and tried to run it. It gave me Segmentation Error (core dumped) as an error. I used commands: which ...
user3138373's user avatar
2 votes
2 answers
3k views

How to ignore multiple files and directories with grive?

Here is grive's man page section for ignore. --ignore <perl_regexp> Ignore files with relative paths matching this Perl Regular Expression. Value is remembered ...
Jason Basanese's user avatar
53 votes
1 answer
1k views

Building Full Perl Support in Ubuntu SDK

I am running Ubuntu v14.04, and after some effort, I have successfully installed the Ubuntu SDK. I need to use Perl + QML/Qt to develop a (potentially large) number of fully-functional apps through ...
Will Braswell's user avatar
0 votes
1 answer
282 views

I need to split up one file with many trajectories into individual files

I have a file called Au7.ANI that has the following format: Everytime a number 37 appears up as a header it means it is a new set of coordinates that follow it. This is repeated in the file 2,000 ...
Heh's user avatar
  • 3
0 votes
1 answer
1k views

How to move files in perl recursively

How can i move all files in a directory to the previous directory in Perl using system command ? I tried the following method and it showed error system('/bin/mv "test/*" , "./"'); bash: syntax ...
Rooney's user avatar
  • 965
1 vote
1 answer
7k views

How to run a perl script with arguments

I'm pretty new with Ubuntu and Linux and I need some help in order ton run a perl script. It may sound silly, but I need to run a perl (.pl) file, using a specific argument. The key is that when I run ...
pitazzo's user avatar
  • 175
1 vote
1 answer
2k views

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 ...
nani's user avatar
  • 25
1 vote
1 answer
338 views

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 ...
Antoni Borysik's user avatar
0 votes
1 answer
58 views

printing distances of desired character based on occurance

This is an extension of my previous question (Printing pattern of "C" character). I would like to print "C" character from "text" column given in file.csv. The file.csv has two coloumns as ...
Trupti's user avatar
  • 111
0 votes
1 answer
520 views

How to run EasyModeller (GUI for Modeller) on Ubuntu 14 x64?

I have successfully installed Modeller. I want to try to use the front end GUI software EasyModeller. However, when I try to run it I receive the error message as follows: user@pc:~/Downloads/...
Aalawlx's user avatar
  • 101
-1 votes
1 answer
1k views

Perl: warning: Setting locale failed [duplicate]

I have problems when installing the tool and performing upgrades in Ubuntu 14.04 LTS. Please assist me Fetched 6738 kB in 1min 19s (85.1 kB/s) perl: ...
Evan Pramono's user avatar
3 votes
3 answers
1k views

Error while installing Apache on 12.04 LTS

On Ubuntu 12.04 LTS server I need Apache 2.4.5 or greater. I do this: add-apt-repository ppa:ondrej/php5 apt-get update apt-get install apache2 But when I run the last command I get: Setting up ...
macurie's user avatar
  • 158
4 votes
2 answers
352 views

adding zero to specific location of file names

I have a directory consists of several files. Files name are as follows; 0102920.05o 0203920.05o 0304920.05o .... I need to add "0" for all files after the first 4 numbers like; 01020920.05o ...
deepblue_86's user avatar
  • 1,194
0 votes
1 answer
40 views

reformat file in bash

A file I would like to parse looks like #header #header2 #header 3 # header 1 565286 SNP1-555149 C T . PASS AC=4270AF=1.00;AN=4270;set=broad GT 1/1 /1 ...
user3069326's user avatar
0 votes
1 answer
84 views

extract line from file

a file I need to extract info from looks like 2 41620 . T G 100 PASS AC=3;AF=0.000599042;AN=5008;NS=2504;DP=18872;EAS_AF=0;AMR_AF=0;AFR_AF=0;EUR_AF=0;SAS_AF=0.0031;AA=...
user3069326's user avatar
0 votes
1 answer
176 views

Can't locate installed software in Ubuntu 14.04

I successfully installed Padre (Perl editor) from software center. But can't locate the installed app. Tried searching but couldn't find. Please help. Screen shot is attached Screen shot
Santhosh's user avatar
  • 105
1 vote
2 answers
3k views

Running a Perl script as cronjob is not working while manual starting does the job

I have 3 cronjob entries (crontab -l) the first entry is a Perl script what creates a LVM backup of a virtual machine and the other two are just sh files performing mysqldump. Well however, I edited ...
TheMAn's user avatar
  • 11
0 votes
1 answer
506 views

How can I scan all connected USB drives for a file?

I have an install of Ubuntu and I would like to run a script (bash, perl, python, whatever) that will scan all connected USB drives and report if it finds a text file. Could anyone guide me on how to ...
Mike's user avatar
  • 171

1 2
3
4 5
7