diff --git a/.github/scripts/cmp-config.pl b/.github/scripts/cmp-config.pl index eef6b24927..5db91cd49f 100755 --- a/.github/scripts/cmp-config.pl +++ b/.github/scripts/cmp-config.pl @@ -135,4 +135,4 @@ foreach my $v (keys %remove) { } # return the exit code from diff -exit system("diff -u /tmp/autotools /tmp/cmake") >> 8; +exit system('diff', ('-u', '/tmp/autotools', '/tmp/cmake')) >> 8; diff --git a/.github/scripts/verify-examples.pl b/.github/scripts/verify-examples.pl index 25be634c8f..dd6ff8d974 100755 --- a/.github/scripts/verify-examples.pl +++ b/.github/scripts/verify-examples.pl @@ -37,12 +37,12 @@ if(!@files || $files[0] eq "-h") { } sub testcompile { - my $rc = system("gcc -c test.c -I include -W -Wall -pedantic -Werror -Wno-unused-parameter -Wno-unused-but-set-variable -DCURL_ALLOW_OLD_MULTI_SOCKET -DCURL_DISABLE_DEPRECATION") >> 8; + my $rc = system('gcc -c test.c -I include -W -Wall -pedantic -Werror -Wno-unused-parameter -Wno-unused-but-set-variable -DCURL_ALLOW_OLD_MULTI_SOCKET -DCURL_DISABLE_DEPRECATION') >> 8; return $rc; } sub checksrc { - my $rc = system("$check test.c") >> 8; + my $rc = system($check, ('test.c')) >> 8; return $rc; } diff --git a/.github/scripts/verify-synopsis.pl b/.github/scripts/verify-synopsis.pl index 2b473f8b4d..00070f318e 100755 --- a/.github/scripts/verify-synopsis.pl +++ b/.github/scripts/verify-synopsis.pl @@ -35,7 +35,7 @@ if(!@files || $files[0] eq "-h") { } sub testcompile { - my $rc = system("gcc -c test.c -I include -W -Wall -pedantic -Werror -DCURL_ALLOW_OLD_MULTI_SOCKET -DCURL_DISABLE_TYPECHECK") >> 8; + my $rc = system('gcc -c test.c -I include -W -Wall -pedantic -Werror -DCURL_ALLOW_OLD_MULTI_SOCKET -DCURL_DISABLE_TYPECHECK') >> 8; return $rc; } diff --git a/scripts/cdall b/scripts/cdall index 3c5c68b525..5fd146d0b8 100755 --- a/scripts/cdall +++ b/scripts/cdall @@ -38,7 +38,7 @@ sub convert { my $nroff = "$cd"; $nroff =~ s/\.md\z/.3/; print "$dir/$cd = $dir/$nroff\n"; - system("./scripts/cd2nroff -d $dir $dir/$cd"); + system('./scripts/cd2nroff', ('-d', $dir, "$dir/$cd")); } } diff --git a/scripts/randdisable b/scripts/randdisable index 89778c146c..a59c6c8125 100755 --- a/scripts/randdisable +++ b/scripts/randdisable @@ -53,31 +53,31 @@ do { my $num = rand(scalar(@disable) - 2) + 2; my $c = 0; - my $arg; + my @arg; for my $d (shuffle @disable) { - $arg .= " $d"; + push @arg, $d; if(++$c >= $num) { last; } } my @stls = shuffle @tls; - $arg.= " ".$stls[0]; + push @arg, @stls; - system("make clean"); - if(system("./configure $arg")) { + system('make', ('clean')); + if(system('./configure', @arg)) { print STDERR "configure problem\n"; - print STDERR "./configure $arg\n"; + print STDERR "./configure " . join(' ', @arg) . "\n"; exit 1; } - if(system("make -sj10")) { + if(system('make', ('-sj10'))) { print STDERR "Build problem\n"; - print STDERR "./configure $arg\n"; + print STDERR "./configure " . join(' ', @arg) . "\n"; exit 1; } if(system("./src/curl -V 2>/dev/null")) { print STDERR "Running problem\n"; - print STDERR "./configure $arg\n"; + print STDERR "./configure " . join(' ', @arg) . "\n"; exit 1; } } while(1); diff --git a/scripts/spacecheck.pl b/scripts/spacecheck.pl index ff498c5a85..d23bf9bd07 100755 --- a/scripts/spacecheck.pl +++ b/scripts/spacecheck.pl @@ -97,7 +97,7 @@ sub eol_detect { my $issues = 0; -open(my $git_ls_files, '-|', 'git ls-files') or die "Failed running git ls-files: $!"; +open(my $git_ls_files, '-|', 'git', 'ls-files') or die "Failed running git ls-files: $!"; while(my $filename = <$git_ls_files>) { chomp $filename; diff --git a/tests/certs/genserv.pl b/tests/certs/genserv.pl index 2e61ecece6..321d76320f 100755 --- a/tests/certs/genserv.pl +++ b/tests/certs/genserv.pl @@ -72,7 +72,7 @@ if(!$CAPREFIX) { } print "$OPENSSL\n"; - system("$OPENSSL version"); + system($OPENSSL, ('version')); $PREFIX = $CAPREFIX; $DURATION = 6000; diff --git a/tests/libtest/test613.pl b/tests/libtest/test613.pl index 813052cb70..f653b36c13 100755 --- a/tests/libtest/test613.pl +++ b/tests/libtest/test613.pl @@ -76,7 +76,7 @@ if($ARGV[0] eq "prepare") { utime time, timegm(0,0,12,31,11,100), "rofile.txt"; chmod 0444, "rofile.txt"; if($^O eq 'cygwin') { - system "chattr +r rofile.txt"; + system('chattr', ('+r', 'rofile.txt')); } exit 0; @@ -86,7 +86,7 @@ elsif($ARGV[0] eq "postprocess") { # Clean up the test directory if($^O eq 'cygwin') { - system "chattr -r $dirname/rofile.txt"; + system('chattr', ('-r', "$dirname/rofile.txt")); } chmod 0666, "$dirname/rofile.txt"; unlink "$dirname/rofile.txt"; diff --git a/tests/sshserver.pl b/tests/sshserver.pl index 8c0d00680b..84baf6a52b 100755 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -811,7 +811,7 @@ if($error) { #*************************************************************************** # Verify that sshd actually supports our generated configuration file # -if(system "\"$sshd\" -t -f $sshdconfig_abs > $sshdlog 2>&1") { +if(system("\"$sshd\" -t -f $sshdconfig_abs > $sshdlog 2>&1")) { logmsg "sshd configuration file $sshdconfig failed verification\n"; display_sshdlog(); display_sshdconfig(); diff --git a/tests/testcurl.pl b/tests/testcurl.pl index d8d7d697df..28614503af 100755 --- a/tests/testcurl.pl +++ b/tests/testcurl.pl @@ -190,10 +190,10 @@ sub rmtree($) { if($^O eq 'MSWin32') { foreach (glob($target)) { s:/:\\:g; - system("rd /s /q $_"); + system('rd', ('/s', '/q', $_)); } } else { - system("rm -rf $target"); + system('rm', ('-rf', $target)); } } @@ -568,7 +568,7 @@ if($configurebuild) { } else { logit "copying files to build directory ..."; if($^O eq 'MSWin32') { - system("xcopy /s /q \"$CURLDIR\" ."); + system('xcopy', ('/s', '/q', $CURLDIR, '.')); } }