Skip to main content

Questions tagged [perl]

Perl is a high-level, general-purpose, interpreted, dynamic programming language. It was originally developed by Larry Wall as a general-purpose Unix scripting language to make report processing easier, over a period with support from open source community, it has evolved and matured to be used for graphics programming, system administration, network programming, finance, bioinformatics, and other engineering applications.

Filter by
Sorted by
Tagged with
0 votes
3 answers
31 views

Sure, PERL_LWP_SSL_VERIFY_HOSTNAME=0 will probably work if one is willing to write scripts: https://stackoverflow.com/questions/6795030/how-to-ignore-certificate-verify-failed-error-in-perl But I just ...
Dan Jacobson's user avatar
0 votes
0 answers
56 views

Hex memory dump is Docsis config file. Is it possible to convert this hex dump info valid Docsis config file? Preferably, using Perl and DOCSIS::ConfigFile module. (or Python scripts, python-docsis). ...
Lexx Luxx's user avatar
  • 1,473
2 votes
1 answer
201 views

Just in theory: is it possible to replace the domain string in the compiled binary file with an IP address by editing a binary file in place with sed? (IP address belongs to a different domain, but ...
fxgreen's user avatar
  • 143
3 votes
2 answers
201 views

I'm stuck with this error without clue or reference how to solve it: I have this list on text.txt Angie Apple Angie Banana Angie Tomato Angie Peach Angie Onion I'm running substitution through ssed (...
Zerchro's user avatar
  • 31
-1 votes
3 answers
224 views

Here is a silly example that effectively illustrates what I need: echo '"this text", " ", "is in speech marks"' | perl -lne 'print "$1" if /"(.*?)"/' ...
Signor Pizza's user avatar
3 votes
6 answers
230 views

I'm trying to clean files that are copy/pasted versions of my Cygwin (mintty) terminal running bash1. Usually, the input and output are separated by a linefeed ('\n'), as expected. However, when I ...
bballdave025's user avatar
-4 votes
6 answers
250 views

I have a file (FILE1) with some repeated sections as below (example): LINE 1 ABCD LINE 2 EFGA LINE 3 HCJK REMOVE LINE11 REMOVE LINE12 REMOVE LINE13 LINE 4 ABCDH LINE 5 EFGAG LINE 6 HCJKD REMOVE ...
Pratap's user avatar
  • 45
8 votes
4 answers
2k views

Here is a script to fix broken Cyrillic filenames if the files were moved to Mac from Windows (based on an answer to Revert filenames after they were garbled by using different encoding) #!/bin/zsh # ...
jsx97's user avatar
  • 1,387
0 votes
1 answer
240 views

I remember I have installed Perl::Rename, by using cpan -i File::Rename, and indeed I have $HOME/perl5/bin with rename and unsafe-rename executables there. But when I try to use rename, # Expected: ...
jsx97's user avatar
  • 1,387
1 vote
1 answer
81 views

I'm using a git post-receive hook to perform some actions after a git push to a remote server. This remote operates over SSH: $ git remote -v server user@server:repo.git The problem is that ...
sidyll's user avatar
  • 207
6 votes
3 answers
573 views

In Perl, /a/i matches both A and a, so I don't have to write /A|a/. What is the easy way to write /4|4/ ? Yes, I'm talking about $ unicode 4 4|grep U+ U+FF14 FULLWIDTH DIGIT FOUR U+0034 DIGIT FOUR ...
Dan Jacobson's user avatar
2 votes
1 answer
569 views

I have Debian GNU/Linux trixie/sid and I installed publican from repo of debian. (publican is doing write and publish for DocBook) When I run publican , It get the following messages: Attempt to call ...
PersianGulf's user avatar
  • 11.3k
0 votes
1 answer
96 views

I am trying to install ImageMagick for perlbrew as an application needed a higher version of Perl than the one that came with my Ubuntu, and this application also needs to use ImageMagick. I am on ...
stacking and exchanging woohoo's user avatar
1 vote
1 answer
39 views

While trying to install the Chart::Clicker perl module, I get a lot of dependency errors. When trying to resolve them, I get similar output for each module from the first to the last module listed in ...
Gene's user avatar
  • 11
3 votes
1 answer
274 views

I'm standardizing the name of several files at once, so I wrote a regex for perl-rename: perl-rename 'y/A-Z/a-z/; s/ã|á|â/a/g; s/é|ê/e/g; s/í/i/g; s/õ|ó/o/g; s/ú/u/g; s/ç/c/g; s/(?<=\d-)*\s/_/g; s/...
Alex Braga's user avatar
1 vote
1 answer
59 views

Last week, I upgraded my Linux file server from Fedora 39 to Fedora 40, and several CGI applications written in Perl stopped working. I first noticed it when Foswiki could not show any pages, because ...
Lars Poulsen's user avatar
0 votes
2 answers
109 views

I have over 3000 files that need to be combined based on specific attributes in the files. For example, each file is named by its ID (Eg. 101567AD_Mly.txt).These IDs correspond to latitude and ...
Kaitlin DeBoer's user avatar
1 vote
3 answers
178 views

For reference, this is a follow-up and variation on group ip address to different subnet with shell We have two strings (named master/slave), the two strings are composed with IPS spread in three ...
peng xiao's user avatar
-3 votes
2 answers
88 views

I have a variable like master='172.21.154.37 172.21.250.94 172.21.251.93 172.21.250.94' and I need to check whether the first and the second column in the file both matches the variable. The following ...
peng xiao's user avatar
0 votes
2 answers
66 views

logfile line 4/10/2024--06:00pm guest 192.168.1.2 https://nixnut.nz/home/accounts/hosting.cgi?action=getonline Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0 in logview file i ...
nixnut's user avatar
  • 3
0 votes
4 answers
257 views

I want to find a regex or perl oneliner to detect two consecutive lines that have the same words in the same order, but the leading spaces, trailing spaces and amount of spaces between the words may ...
Sistemas Libsur's user avatar
0 votes
4 answers
157 views

I'm trying to replace "}," by "}" from the last line of a file : My /etc/firefox/policies/policies.json file like this because I added the certificate lines using a for loop : $ ...
SebMa's user avatar
  • 2,473
1 vote
1 answer
902 views

we have recently upgraded our system from RHEL7 to RHEL8 , and when executing below command we are getting error RHEL7.9 = Perl 5.16.3 RHEL8.10 = Perl 5.26.3 Command 1: perl -MList::Util -e 'print &...
Samurai's user avatar
  • 95
1 vote
1 answer
98 views

The old 2-arg version of open (i.e., open FILEHANDLE,EXPR) to open a file in perl is deprecated. For security reasons, it should be replaced by the 3-arg version open FILEHANDLE,MODE,EXPR. There is ...
Uwe's user avatar
  • 3,379
1 vote
3 answers
162 views

Why does this Perl Regex one-liner not make the full result upper case using the \U modifier? I expect MY_NICE_WORD. $ perl -pe 's/(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])/\U$1_$2\E/g' <(...
Jonathan Komar's user avatar
-1 votes
3 answers
178 views

I have a hard time figuring out how to remove duplicate but incomplete strings of text. No success using perl, awk or sed. I need to transform: a b a b c a b c d a b c d e a b c d x a b c d z into a ...
Simon Ante's user avatar
7 votes
1 answer
282 views

$ perl -wle 'my @388=0..2;' Can't use global @388 in "my" at -e line 1, near "my @388" Execution of -e aborted due to compilation errors. $ perl -wle '@388=0..2;' $ Where can I ...
Dan Jacobson's user avatar
1 vote
0 answers
544 views

I have an issue with our AlmaLinux 8.10 systems that they suddenly have issues with perl dependancies. It tuns out that the current active perl stream is 5.26 (dnf module list perl*) but some packages ...
Stefan Lelieveld's user avatar
-1 votes
3 answers
124 views

On a Linux machine with GNU tools I have an ascii file that consists of only 2-line and 3-line paragraphs, each paragraph separated by a newline. All 2-line paragraphs are to be deleted so that all 3-...
stampeder's user avatar
0 votes
1 answer
917 views

I was instructed to upgrade Debian 10 to Debian 12. After the upgrade, I noticed that the ssh.service was not working. Now I found out that apt commands work. I can't install anything. Here the ...
Szymon Tesmer's user avatar
16 votes
5 answers
2k views

A non-root linux user owns a text file that's located in /etc, where the non-root linux user does not have permission to create files. The non-root linux user can edit the file manually via vi without ...
Tortoise Pirate's user avatar
0 votes
1 answer
60 views

This line I have in my code cuts the .csh from a string and returns the rest of it. Can someone explain what each part of it does? ($eachJOBID = $eachScriptNoPath) =~ s/\.csh// ;
manylya's user avatar
1 vote
3 answers
109 views

I have a kdenlive project file (which is basically a xml file) with a lot of text clips inside. I need to bulk edit the x coordinate of a certain text that appears multiple times. This is an example: ...
baiserekku's user avatar
3 votes
1 answer
639 views

I'm trying to debug a failing legacy process monitor that searches processes that are running. I determined it is being caused by some mysterious linux behavior. The process being ran is /opt/my/path/...
k.schroeder31's user avatar
1 vote
1 answer
102 views

I am trying to catch the password prompt of sftp, but somehow it is not from STDIN or STDERR. It possibly comes from a sub-process. The following is my test. I tried to redirect the password prompt to ...
oldpride's user avatar
  • 251
0 votes
1 answer
153 views

A Perl script is stuck, root 1317478 99.8 0.0 264072 22516 ? R 04:57 478:37 /usr/bin/perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=domain.tld-http -staticlinks -configdir=/...
Thomas's user avatar
  • 23
6 votes
3 answers
1k views

I have a two-column file that you can create as follows cat > twocol << EOF 007 03 001 03 003 01 137 12 001 11 002 01 002 02 002 03 001 02 002 04 137 94 010 21 001 01 EOF The resultant file, ...
bballdave025's user avatar
0 votes
1 answer
141 views

How is one supposed to write this? print <<EOF; if $x bla EOF I think it is called postfix notation, and a here-doc. I get a syntax error. OK, I guess I'll just use print "bla" if $x; ...
Dan Jacobson's user avatar
3 votes
7 answers
482 views

I am learning Perl, but I don't know how to solve this problem. I have a .txt file of the following form: 1 16.3346384 2 11.43483 3 1.19819 4 1.1113829 5 1.0953443 6 1.9458343 7 1.345645 8 1....
69 420 1970's user avatar
2 votes
1 answer
58 views

While programming using Emacs, you frequently consult manual pages. My environment is text-based Emacs via SSH. While I can open "Normal" manual pages in Emacs using the man command ((man ...
U. Windl's user avatar
  • 1,777
1 vote
1 answer
54 views

PIN A 1 1:3 0:8 0 0:0 PIN B 1 1:0 0 0:0 Z Z:0 PIN C 1 1:3 0:8 0 0:0 Z Z:0 I would like to change the content on PIN A & PIN C only without affecting PIN B to 0 0:3 Z 0:3 Can't seem to find a ...
JSL's user avatar
  • 11
1 vote
1 answer
72 views

Newbie learning Linux and perl: I would like to (a) search-replace strings, (b) match filename pattern .myfile., (c) look recursively in subdirectories, and (d) print the line number, file name, ...
Susie's user avatar
  • 13
1 vote
7 answers
606 views

Consider that I have the file listed below. I need to select all lines from every instance of the regex pattern Word A to before the regex pattern Word D. Word A Word B Word C Word D Word E Word F ...
RonJohn's user avatar
  • 1,483
0 votes
1 answer
62 views

I guess first up is the Question " is perl data language dead ?" I'm not finding any active discussions or user q&a sorry for not tagging this better I dont have the rep' my problem area ...
aldobranti's user avatar
4 votes
0 answers
71 views

I wrote a network daemon that forks off children to handle TCP connections. On SIGINT the main process triggers a kill for each child in order to clean up and to collect some final statistics. In ...
U. Windl's user avatar
  • 1,777
2 votes
3 answers
929 views

I have a shell script that I am trying to pass a date argument to ARGV[1] but the script is giving a blank output Here is the command: #!/bin/bash dt=$(date -d "yesterday" '+%m%d%Y') cat /...
NecroCoder's user avatar
4 votes
4 answers
2k views

I wrote a simple Perl server that listens on a TCP port/socket, accepting connections. Now I wonder: When wanting to implement address-based access control, is it possible to check the address of the ...
U. Windl's user avatar
  • 1,777
-2 votes
3 answers
169 views

I want to check the folder/s under /var/kafka that all them are ended with number otherwhile I will exit with error ls -ltr /var/kafka drwxr-xr-x 399 kafka kafka 28672 Nov 9 13:10 data6 drwxr-xr-x ...
yael's user avatar
  • 14k
0 votes
2 answers
109 views

I've been playing with the perl implementation of the rename tool in cygwin having finally got it working via installing from cpan. It's been a long time since i played with this stuff so I'm a bit ...
Adam B's user avatar
  • 3
2 votes
4 answers
305 views

I have a text file with accounts like: Input Sample Paid 100 15/02/2022 3000 recd 50 15/02/2022 nelur trip 3050 PAID 80 25/03/2022 Adjusted towards trip 3130 14 PAID 50 26/03/2022 Given to Nate Cash (...
tgkprog's user avatar
  • 249

1
2 3 4 5
28