Stack Exchange Network

Stack Exchange network consists of 175 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 powerful, high level programming language. Questions about Perl should be limited to the Perl development environment, running Perl, or using Perl to automate tasks on your computer.

0
votes
1answer
67 views

Cannot upgrade git on CentOS6

I have $ git --version git version 2.18.0 $ cat /etc/yum.repos.d/WANdisco-git.repo [WANdisco-git] name=WANdisco Distribution of git baseurl=http://opensource.wandisco.com/rhel/$releasever/git/$...
0
votes
2answers
53 views

Why is this Perl command failing on the Windows command line?

I am trying to replicate the Perl command from this answer on Ask Ubuntu in a Windows command line environment. I believe I have downloaded Perl for Windows and installed it correctly, so the error ...
0
votes
0answers
36 views

Updating/upgrading the perl module Sys::Hostname

I want to run a piece of code that requires version 1.21 of Sys::Hostname. My perl-5.28.1, installed using perlbrew at the time, came with version 1.20 of Sys::Hostname. I have searched online, but am ...
0
votes
0answers
21 views

Perl compilation on Mac-OS

I have ActivePerl-5.12 and Perl Dev Kit 9.1.1 When I tried to compile my perl source, I am getting the following error /opt/pdk/bin/perlapp --force --perl /opt/ActivePerl-5.12/bin/perl-static --...
3
votes
2answers
40 views

To override the contents of files

I have two files, file1.txt and file2.txt, file1.txt is: perimeter a=10 perimeter b=15 perimeter c=20 file2.txt is: perimeter a=12 perimeter b=14 Let me know the sed or Perl to override the values ...
1
vote
1answer
59 views

Using Plink.exe to remotely logon to remote RedHat Linux server to run local Perl script

Long time member, first time poster. I have researched this issue thoroughly but I have not found a solution to this particular issue. I work in a NOC and I am responsible for monitoring servers. ...
0
votes
0answers
29 views

cpan: lzma.h not found

I just installed Perl on Windows 10 and I am trying to run a script, that requires Compress::Raw::Lzma package installed. When I run cpanm Compress::Raw::Lzma I got following error: Lzma.xs:18:...
0
votes
1answer
20 views

Repair C compiler via telnet

When I try to install a perl mod in cPanel I get this error: Checking C compiler....Could not locate an executable "gcc" binary....Done ** Unrecoverable Error ** The C compiler is not functional ...
0
votes
0answers
84 views

get sub info from cli mediainfo

I am writing a Perl script with a call to mediainfo cli version to print info only about subtitles with: 'system("MediaInfo \"--Output=Text\;%ID%: %Format%\$if(%Language/String%, SUBTiTLE: ..............
0
votes
1answer
52 views

how to align lines to the left side with sed or perl one line liner

we have the following file how alignment lines to the left side with sed or perl one line liner more conf.env # Extra ssh options. Empty by default. export HADOOP_SSH_OPTS="-o ConnectTimeout=5 ...
1
vote
1answer
353 views

Problems executing perl on git for windows bash

The issue is that perl is installed in my system and bash can see it, however when I try to execute a perl script that includes a module, there's an error. Can't locate Text/CSV.pm in @INC (you ...
0
votes
0answers
118 views

Installing Net::LDAP on Strawberry Perl running on Windows 7

I am attempting to install Net::LDAP on Strawberry Perl 64-bit (v5.26.2) without success. The command line 'cpanm' fails and points to a build.log. It appears that files are not located where they ...
0
votes
1answer
26 views

Print out data was not similar with input and would like to remove some of the data in the content

I want to try print all the content in .txt input file to process some data but i was facing some problem as the content print out was not tally. May i know why it was like that? Thanks everyone. I ...
0
votes
0answers
91 views

How to protect webmin via .htpasswd?

Originally asked this here but I think it was the wrong site. I have got webmin installed on my Ubuntu. What would be the best way of adding an additional password layer like via .htpasswd file? So ...
1
vote
2answers
363 views

Extract portion of text file from first occurrence of one string to first occurrence of another

How can I extract a portion of a large text file, starting at the first occurrence of FOO and ending at the first occurrence of BAR? In my case, I'm trying to extract a portion of a sql file created ...
1
vote
0answers
40 views

apt is broken relying on broken perl version

while trying to upgrade packages on pibian I am running into the following issues, all issues to resolve it seem to involve upgrading perl which is not possible with apt relying on broken perl At ...
0
votes
1answer
181 views

Trouble doing backup with tar using the results of find command

So I'm doing this perl script to backup my music. It will search for new music added to my disk since the last backup. When this command runs: find ~/Music -type f -mtime -145 | xargs tar -cvf ...
1
vote
0answers
36 views

Script does not run in Browser but it works in command prompt [closed]

I am using an Windows 10 and Apache24 with php72. I am trying to run a perl script that is using Win32::OLE to open an Word document and put some content inside a document. Perl script runs fine from ...
2
votes
1answer
77 views

Why does my Perl regex not work to remove certain strings following newlines?

I have text that looks like this text \centering more text I want to convert it to: text more text Using Perl My code is: perl -00 -pe 's/\R+\\centering\R+/\n/g' example.md It doesn't work at ...
0
votes
2answers
93 views

linux: how to capture the number/s from string

I use the following syntax in order to capture only the number from machine hostname echo machineLinux05 | sed s'/\./ /g' | awk '{print $1}' | sed 's/[^0-9]//g' 05 But this way is not so elegant. ...
2
votes
1answer
133 views

Open batch file and execute commands from there

My intention is to run a perl script latexdiff.pl from a portable version of perl. There is a batch file portableshell.bat which sets up the environment for perl. If I open it and type perl latexdiff....
1
vote
1answer
382 views

grep regex to include the log timestamp

I'm grepping lots of log files for certain Oracle related errors with ORA-xxxxx error codes. All the log entries start with a Timestamp(eg : 2017-11-29 23:51:46,372). Some of the log entries are multi-...
0
votes
1answer
517 views

Can cron “cache” scripts it runs?

Caveats up front: 1. My *nix knowledge is very limited but growing. 2. This particular issue applies to SunOS 5.10 (I know) but I'd be interested in general answers. If a cron entry runs script ...
0
votes
0answers
54 views

In Pidgin, perl.dll is not loadable error

I can find this error in Pidgin's (version Pidgin 2.12.0, libpurple 2.12.0) debug window: (17:57:27) plugins: C:\Program Files (x86)\Pidgin\plugins\perl.dll is not loadable: `C:\Program Files (x86)\...
1
vote
0answers
647 views

Settings LOCALE on Raspberry Pi3

I'm using raspberry for years and Linux for many more... Trying to installing Docker in my rpi I get an error, it is probably related to the LOCALE installation. The problem is this: apt-listchanges: ...
0
votes
1answer
164 views

Script to Reboot Virgin SuperHub

I'm currently trying to write a script that will reboot my Virgin SuperHub when set up as a cron job. However, it keeps failing with the following error: "There is no form with ID "...
0
votes
0answers
27 views

How can I convert SAS data files into something simple like Excel data using Perl?

I am new to Perl.I know how to do the same thing using R and Python but I am unable to do so in Perl. My requirement says it has to be specifically in Perl.
0
votes
1answer
181 views

How to install Qt module on perl?

i want to install perlqt to create a GUI. i see the INSTALL file and it said that a need to install KDE. is really necessary this installation? or just some files. thanks for you reading.
1
vote
1answer
252 views

Net::OpenSSH error module

I am new to CGI scripting I am trying to connect to another server using Net::OpenSSH but giving the following error #!/tools/openbin/perl/5.16.3/sparc-sun-solaris8/bin/perl use strict; use ...
0
votes
2answers
422 views

Replace Single Line with Multline content within the file nginx.conf

I want to make a backup of the file "/etc/nginx/nginx.conf" And then edit it so the following line in the file: include /etc/nginx/sites-enabled/*; Will instead appear as... include /etc/nginx/...
0
votes
1answer
143 views

run piconv within perl script for batch conversion

I am trying to convert a set of Windows 10 files in a directory from ANSI to UTF-8. I have found the following command that works in a command prompt for a single file if the command is run from the ...
0
votes
1answer
40 views

How about make a home made VPN. Am short of money to renew my VPN

Is it possible? For instance I create process that listen 80 and 443 port, collect data, crypt it with special key inside. Then send it to server. Server decrypt data and check key, if key okay, it ...
0
votes
1answer
286 views

split multiple delimiters using perl

I am trying to extract only the FREE HEAP count value which is 1400 from the below line. Here i'm using split function twice to get the value. Can somone help me to get a single regex that would ...
0
votes
0answers
368 views

How to use PowerShell Set-Content?

I have a perl script that produces utf8 output. I tried using Set-Content to write a utf8 file as suggested by Powershell overruling Perl binmode?. perl -S testbinmode.pl | Set-Content "binmode.txt" -...
0
votes
2answers
186 views

Bash script to crosscheck list of names with a firewall config file

I am looking to automate something with a script in bash or python. Let's say I have a config file from a device. A simple config.txt file. Content could be like this (actual file is much longer and ...
0
votes
3answers
594 views

Regex from substring to first occurrence of another substring

I need to eliminate the textClipping files from a list. Unfortuately some files have been terribly named and contain a carriage return. I need the perl regex for that would match each path from /...
0
votes
2answers
183 views

write a command output to a file and match a string

I am new to perl. I'm writing below script to print the system boot time information from the windows command systeminfo. There look some problem here. I'm getting the output like this. Could someone ...
0
votes
1answer
202 views

Cannot access Linux Oracle Databse with Perl Script after connecting with PuTTY

I have the following problem: I currently connect to one of our Linux servers using PuTTY on my Windows 10 machine. If I use a ‘standard’ PuTTY connection I have no problem: I can log in and run my ...
1
vote
0answers
51 views

how to parse a xml which might have zero to N number of nodes using perl

How to handle a xml which might have one or more occurance of node in the file in perl. In the current solution provided below, foreach $FileContainerRec (@{$XmlFile->{FileContainer}}) { $...
2
votes
0answers
119 views

How to debug mod_perl compilation errors during start and reload of Apache httpd 2.4?

I'm running Ubuntu 16.04 LTS with httpd 2.4 and mod_perl2 to host a PerlAuthenHandler for some web app. It has been 14.04 LTS before and was upgraded some weeks ago. This works in general but ...
1
vote
2answers
152 views

bash + PERL hybrid script

I am new to this community, I tried to find relevant answers but could not find any. My question is, I want to use perl script in a directory of files ending with .fasta, if I do in bash as for i in ...
2
votes
1answer
90 views

Run Perl script from CD?

I've created a Perl script and burned it to a CD-ROM disc. I would like to be able to run the script from the CD without having to copy it to some directory on the hard drive. For some reason when ...
1
vote
1answer
98 views

CGIProxy running on macOS fails to connect to sites using SSL

I'm trying to run a web proxy CGIProxy on one of my home servers that's running macOS 10.11.6. I've set up the web server using Apple's Server utility. By and large it works, but there's a few ...
1
vote
0answers
32 views

Why autocompletion did not work?

When I try to autocomplete file name as next: perl t/fiTAB+TAB It work fine. But when I use -d option on command line. It does not: perl -d t/fiTAB+TAB What should I do to make it works?
0
votes
1answer
149 views

I am not receiving the email when I try to send using Perl (MIME::Lite)

#!/usr/bin/perl use MIME::Lite; my $to = 'mkumar@birdserver.com'; my $from = 'pkumar@birdserver.com'; my $subject = "Eventful"; my $message = " Hi - Test email"; $msg = MIME::Lite->new( ...
0
votes
1answer
20 views

mod_perl scripts stop seeing the filesystem after some time

I use mod_perl scripts under Apache 2.4.18 on a VPS under Ubuntu 16.04. The scripts open files from the disk (web page templates). From time to time, they stop seeing these files, the server error log ...
0
votes
1answer
256 views

Count number of separators in CSV lines and print line number

We have a CSV file with more than 50000 lines. This is only an example of the content: Dcccrev,wefrwvfr,rfregt,wr4f,rfvrv,ecxwec,ecfrv,rfrf Grge,gtgr,frfrv,gthtgv,gerg5tgvrt,rvrfvtg,tgt,frfrf,rfrf ...
0
votes
2answers
10k views

Perl script can't locate Env.pm in @INC

I am trying to run a Perl script that, near the beginning, has use Env '$Foo1', '$Foo2'; I am getting the following message: Can't locate Env.pm in @INC (@INC contains: /usr/local/lib64/perl5 /...
1
vote
1answer
118 views

Run application from html button using php/perl

I was wondering if there is any way to open an application or file browser such as nautilus from a local html button using php or perl. The webpage is local and I have php and perl installed. I can ...
2
votes
1answer
407 views

Sed/awk/perl match all prefixes of a given string

I'd like to match all lines in a file that either my word is a prefix of, or the line is a prefix of my word. For example searching for "abc" should match: a ab abc abcd abcxyz but not: ...