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/

learn more… | top users | synonyms

1
vote
2answers
29 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 ...
0
votes
1answer
20 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 ...
0
votes
3answers
26 views

Convert Number of Decimals Through a Text File

This question's solution may revolve around perl, sed or awk and unfortunately I am not familiar with any of those. My purpose is to convert a computer-generated text file to give it more ...
0
votes
1answer
32 views

Unable to install qt5.5 from git in Kubuntu 14.04.3?

I tried to install qt5.5 from git and after doing the following git clone git://code.qt.io/qt/qt5.git -branch5.5 cd qt5 ./init-repostiory ./configure I am getting the following error: You ...
0
votes
1answer
31 views

404 not found on ubuntu 15.10

I have installed Apache2 and perl on ubuntu 15.10. When i try to run a perl program on the server it says. Not Found The requested URL /cgi-bin/test.pl was not found on this server. But i'm able to ...
1
vote
2answers
41 views

data file re-organisation

I have a .data and I need to re-organise it so that 3 consecutive lines are joined together in a single line. Just to be clear, I have the following ... D611102 = 'SVM_PRS_Hydr_L01', T = 0.0, C = ...
0
votes
0answers
52 views

Ubuntu 15.10 Installing SDL2

I have ubuntu 15.10 running as a virtual machine I would like to install and use SDL2, I followed this process What is the general procedure to install development libraries in Ubuntu? as well as the ...
0
votes
0answers
29 views

why my desktop entry file not working for a perl program?

[Desktop Entry] Name=hotel Version=1.0 Encoding=UTF-8 X-GNOME-FullName=hotel Type=Application Categories=Application;Utility; Path=/home/yathayed/yedukondalu/programs/perl/advanced/tk Exec=perl ...
0
votes
0answers
107 views

Package unmet dependecies Perl-base Ubuntu 14.04 64 bit

i'm trying to sudo apt-get upgrade , but there is error. it happened when i try to install too. running sudo apt-get -f install here is the error return : dionajie@dionajie-Notebook:~$ sudo ...
0
votes
0answers
22 views

Perl file doesn't work in the Terminal [duplicate]

I have a perl.pl and want to perform it. Why doesn't work?
1
vote
1answer
29 views

Perl check internet connection for 30 seconds if stable, not stable and no internet connection

I want script in perl that can check if my internet is stable, not stable or no internet connection. I use Ping::Net script but reply is "You are connected to the internet.", not checking internet ...
0
votes
2answers
43 views

please explain while loop in the PERL code?

This is some code to find word,chars,lines in a file. Can anyone please explain the while loop? open(FILE, "<data.txt") or die "Could not open file: $!"; my ($lines, $words, $chars) = (0,0,0); ...
1
vote
4answers
447 views

Accessing MYSQL through terminal

I just installed LAMP in my computer through commandline.Now how can I access MYSQL prompt from commandline?I need to use MYSQL to create tables,views and then access them from my Perl script.
0
votes
1answer
76 views

Sequential renaming of files

I found an answer for zero-padding numerical filenames which works fine for renaming filenames as follows : 1.jpg > 00001.jpg 2.jpg > 00002.jpg . . . 9.jpg > 00009.jpg That uses the ...
2
votes
1answer
111 views

batch rename zip files based on contained file names

I've got a directory with 15000 zip files. I'd like to rename all files which, when unzipped, contain a file of the form YYYYMMDD_IPC.csv where YYYYMMDD happens to be a date but for the purposes of ...
0
votes
1answer
20 views

Problem with rename and mask the point

Lets assume that I want to rename a file: "topography_9x9._001.png" to "topography_9x9_001.png" I would use rename -n s/9\./9/g topography_9x9._001.png renamed as topography_99_001.png Why ...
1
vote
1answer
26 views

problem Gunzip a file in perl [closed]

I have below file: 9001_20150918165942_00085.xml.gz I want to gunzip it "9001_20150918165942_00085.xml", how can I do it in perl. Regards, Bhushan
1
vote
2answers
95 views

Ubuntu 14.04 LTS - what version of padre should I use? [closed]

I am a new, not experienced user and just installed Ubuntu 14.04 LTS. What version of padre should I use ? Any recommended sources ?
0
votes
1answer
170 views

installing getopts.pl into the perl installation

I need to install getopts.pl into my Perl installation. The software I use request that getopts.pl should be part of the Perl installation or my path need to be appropriately pointing to the paths of ...
1
vote
1answer
98 views

perl net::pcap installation on Ubuntu

I am trying to run a perl script that uses Net::pcap but it doesn't work for me, I installed libpcap-dev, libnet-pcap-perl and libpcap. After that I downloaded Net:pcap from CPAN, and now I don't know ...
-2
votes
1answer
73 views

How to edit INC with latest library in perl

How can I avoid the error below when running a Perl script? Can't locate YAML/XS.pm in @INC (@INC contains: ../../../YAML-LibYAML-0.35/blib/lib/YAML/XS.pm /app/utp/utp/apps_oper/perl5lib ...
1
vote
1answer
112 views

How to install the PHP/Serialization module in Perl?

When running nfsen, my logs display: nfsen[24213]: ERROR: Can't locate PHP/Serialization.pm in @INC (you may need to install the PHP::Serialization module) (@INC contains: /usr/local/nfsen/plugins ...
0
votes
1answer
74 views

Running Multiple perl script simultaneously

I have three identical perl script; say test1.pl, test2.pl, test3.pl Each perl script have a set of commands. For example; command to run test1.pl perl test1.pl arg1 arg2 &; test1.pl ...
2
votes
2answers
90 views

Search for number sequence

say you have a file1.csv containing 5 million lines, each line has 8 random numbers separated by comma. And you have this sequence 7,152,13,11,42,5,7 How to output the lines in file1.csv containing 3 ...
1
vote
1answer
37 views

Is there a way to force Perl to always use the latest version?

This is in relation to this question: Why doesn't Perl use latest version by default? I'm aware that I can force it with use v5.14 from within a script, and that's what I'm currently doing, but ...
-1
votes
1answer
28 views

read numbers with e in awk

Hello a file I am working with looks: header // SeqT: {"POS-s":174.683, "time":0.0130084} SeqT: {"POS-s":431.49, "time":0.0221447} ...
2
votes
3answers
199 views

How can I divide an output with 2 delimiters?

By dividing with the "·" and " " characters, I would like to turn this: Hel·lo my name is E·ric To this: Hel·lo my name is E·ric Hel·lo my name is E· Hel·lo my name is Hel·lo my name Hel·lo my ...
0
votes
0answers
50 views

How to check if a switch is configured in 'ssh' or in 'telnet' using perl script provided the switch IP is available…?

In a perl script, when a switch IP is available, it is required to know if the switch is configured for 'ssh' or 'telnet' for continuing execution. How can this be done..? Please help it...
0
votes
2answers
854 views

Trying to execute a run.pl file

I am trying to run a run.pl file form the OpenDroneMap directory using the command ../OpenDroneMap/run.pl from within the Photos directory however I keep getting a Bash error. Would there be any ...
0
votes
1answer
77 views

split files with specific pattern

A file I work with is like NAMES n0 n1 n2 n3 n4 n5 n6 n7 REGION chr 1 100000 404 AAAAAAGA 992 TTTTTTTA 1146 CCCCGGCC 1727 CCCCCACC 1778 GCCCCCCC My desired output is (please ...
0
votes
0answers
224 views

Locale warning from Perl stops Postgres configuring

So I want to set up Postgres on a Microsoft Azure-server running Ubuntu 14.04. I need to make a cluster: user@mysystem:~$ pg_createcluster perl: warning: Setting locale failed. perl: warning: Please ...
3
votes
3answers
200 views

apt-file regex: escaping a dot

I want to find all packages which provide a shared object containing "ssl" in the file name. The apt-file manpage says: --regexp | -x Treat pattern as a (perl) regular expression. ...
3
votes
4answers
270 views

Bash create custom string

how could in bash a pattern like ROW1 n1 n2 n3 n4 up to 300 be done with some command in bash or also just perl...the delimiter would need to be \t as above
1
vote
1answer
74 views

diffrence between two files of different row numbers

Yesterday I asked this question, and got awesome answers, it's really a joy to ask questions on this site. Today I got a slightly different question say I have csv1 1,2,3,4 5,6,7,8 -- 9,10,11,12 ...
1
vote
4answers
90 views

matrix operation in bash [closed]

the point is that I woul need to transpose a large file - 1600 times 80k but the entries are not tab delimited but just U and K so it looks like UUUUTTTUTUTUUUTUTUT TTUTUTUTUUTUTUTUTUT is there a ...
-6
votes
1answer
148 views

code matrix to letter [closed]

a txt file I have looks like this 1 3 6 7 9 11 000000 100001 000101 110100 000100 the recoded version should be UUUUUUUUUUU YUUUUUUUUUY UUUUUUYUUUY YUYUUUYUUUU UUUUUUYUUUU for this the first ...
1
vote
2answers
44 views

How to to fetch kernel errors in Ubuntu..? [closed]

I a trying to make an alert e-mail system using Perl Script, when a kernel error occurs in a server. How can I fetch serious error logs from the kernel? Logs can be seen in /var/log/kern.log The ...
2
votes
1answer
89 views

Why does Perl always need the “-p” option to be given even when the input file is stdin?

Update #2: I had a great missunderstanding about the -p option, now it's clear to me that it's used to process all the files provided as an argument, but I still don't quite understand why this is ...
-1
votes
2answers
2k views

How to ssh using perl scipt,run a command, and return the output…?

As clearly explained in the question, kindly give me an option to ssh to a machine using perl script, run a few script lines there, and return the output to the source machine. Found out a few docs ...
1
vote
1answer
113 views

how to fix error perl -e exit?

perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_PAPER = "id_ID.UTF-8", LC_ADDRESS = "id_ID.UTF-8", ...
3
votes
1answer
292 views

How to enter a declared variable in the mail body, while sending mail using perl script?

I am sharing a perl script here, which is supposed to send a mail with the HDD/RAM status in the message body: Also, the HDD out will happen only if the %HDD use is above 50%. How can I include the ...
2
votes
2answers
378 views

can't install cpan module GD

Since I failed to install Image::Magick on my non-GUI Ubuntu server Ubuntu 14.04.2 LTS (read about it here), I tried to install another image-manupulation tool that can be used from a perl-script: GD. ...
2
votes
6answers
387 views

How can I extract text between a pair of the same character?

Input: blahŤfoobar1Ťblah Desired output: foobar1 I want to get the text between two "Ť" characters. Assume there will always be either 0 or 2 "Ť" characters, to make things easier. I tried the ...
2
votes
1answer
174 views

How to make a bootable pendrive in command-line?

How could a Bootable USB Pendrive can be created using the Ubuntu command-line. Can we use a script for the same? Can somebody help on this?
2
votes
0answers
779 views

Apache 2.4 and mod_perl 2 on Ubuntu 14.04: local configuration

I'm trying to get Apache 2.4 configured such that I can test mod_perl 2 code locally (I should note that I have little recent experience with Apache). I've installed both of them on a machine running ...
0
votes
1answer
196 views

How to create a perl script which checks the system stats(CPU,RAM,HDD) and sends an alert mail? [closed]

The script is for adding to the cron tab. The flow of the shell script should be like this. 1. Checks the CPU state. 2. Checks the RAM usage. 3. Checks the HDD usage. 4.Sends an alert mail to ...
-1
votes
1answer
85 views

How to compare/fetch the greater value in perl script? [closed]

Trying a perl script to fetch the % of hard disk usage. [By fetching the 5th column of the 'df -H' output, shows percentage of use]. $thirdlast=`df -H`; @matches=($thirdlast=~/(\S+%)/g); print ...
2
votes
1answer
465 views

Using awk command in perl script [closed]

Can somebody suggest how to use piping of commands in a perl script? Specifically commands that involve calling awk? I'm trying to create a perl script that will read disk usage using df -H and ...
2
votes
4answers
605 views

Parse lines with specific pattern out of file

I have a file that looks roughly like this : [25]:0.00843832,469:0.0109533):0.00657864,((((872:0.00120503,((980:0.0001 [29]:((962:0.000580339,930:0.000580339):0.00543993 ...
2
votes
2answers
53 views

How can I put a cluster lines in numeric order?

How can I convert this: -foo -bar 42 \ randomtext=00 "00" \ -randomtext=00 "00" \ -foo -bar 104 \ randomtext=00 "00" \ -foo -bar 1 \ -randomtext=00 "00" \ To this: ...