perl: switch from backticks to qx()

To make it easier to find external command invocation in the source.

Also drop backticks from a comment.

To find external command invocations in Perl code use:
```sh
git grep -E "((exec|qx|open2|open3|system)\(|open\(.+-\|)" $(<perlfiles>)
```

Refs:
https://perldoc.perl.org/functions/qx
https://perldoc.perl.org/perlop#Simpler-Quote-Like-Operators

Closes #21994
This commit is contained in:
Viktor Szakats 2026-05-19 17:41:07 +02:00
parent c61f007a73
commit 9972f700a8
No known key found for this signature in database
17 changed files with 48 additions and 48 deletions

View file

@ -69,7 +69,7 @@ use getpart;
# This function is currently required to be here by servers.pm
# This is copied from runtests.pl
#
my $uname_release = `uname -r`;
my $uname_release = qx(uname -r);
my $is_wsl = $uname_release =~ /Microsoft$/;
sub logmsg {
for(@_) {
@ -108,7 +108,7 @@ sub parseprotocols {
# Initialize @protocols from the curl binary under test
#
sub init_protocols {
for (`$CURL -V 2>$dev_null`) {
for (qx($CURL -V 2>$dev_null)) {
if(m/^Protocols: (.*)$/) {
parseprotocols($1);
}