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.

8votes
4answers
2kviews

Why do my UTF-8 filenames always match against a regex bracket expression in Perl?

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,347
0votes
1answer
66views

Perl: The module is installed but doesn't work

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,347
1vote
1answer
36views

Git hook on SSH remote fails due to not reading shell configuration

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
6votes
2answers
503views

How to make Perl half/full width-insensitive regular expressions?

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
2votes
1answer
219views

Attempt to call undefined import method with arguments ("abs2rel") via package "File::Spec"

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
0votes
1answer
46views

Error when installing ImageMagick with perlbrew

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
1vote
1answer
24views

What is the "reports" command in install errors

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
3votes
1answer
169views

Replace accented characters with perl-rename

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
1vote
1answer
23views

Fedora 40 - Apache Perl CGI - Open for writing fails

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
0votes
1answer
63views

Combining multiple files by year (column in data) into one line and add file name as first column in Perl or Python

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
1vote
3answers
133views

make master/slave ip in different subnet

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
-3votes
2answers
77views

grep specified variable from a file [closed]

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
0votes
2answers
49views

how to extract useragent complete (has spaces) from logfile

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
0votes
1answer
173views

regex to detect two consecutive lines that have the same words in the same order, but different spaces at leading, trailing and between words

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
0votes
4answers
112views

How to replace pattern in last line

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,401

153050per page
close