]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
scripts: drop redundant double-quotes: `"$var"` -> `$var` (Perl)
authorViktor Szakats <commit@vsz.me>
Thu, 19 Mar 2026 00:15:43 +0000 (01:15 +0100)
committerViktor Szakats <commit@vsz.me>
Sat, 21 Mar 2026 12:21:06 +0000 (13:21 +0100)
Closes #21009

33 files changed:
scripts/cd2cd
scripts/cd2nroff
scripts/cdall
scripts/checksrc.pl
scripts/delta
scripts/mdlinkcheck
scripts/mk-ca-bundle.pl
scripts/nroff2cd
tests/devtest.pl
tests/ftpserver.pl
tests/getpart.pm
tests/memanalyzer.pm
tests/processhelp.pm
tests/runner.pm
tests/runtests.pl
tests/secureserver.pl
tests/serverhelp.pm
tests/servers.pm
tests/sshhelp.pm
tests/sshserver.pl
tests/test1119.pl
tests/test1135.pl
tests/test1139.pl
tests/test1140.pl
tests/test1173.pl
tests/test1177.pl
tests/test1222.pl
tests/test1275.pl
tests/test1488.pl
tests/test1544.pl
tests/test971.pl
tests/testcurl.pl
tests/valgrind.pm

index c297d5e0bd35c6bd9e308b2f00d579a56f03fd7f..182cb62c8a3452f36bc7575ede5fea9ddb2dbbb3 100755 (executable)
@@ -89,7 +89,7 @@ sub single {
     my $salist = 0;
     my $copyright;
     my $spdx;
-    open(F, "<:crlf", "$f") ||
+    open(F, "<:crlf", $f) ||
         return 1;
     while(<F>) {
         $line++;
index adc66216d76e3a8c7a292d9b97b0fb0ff7780b55..8cf3eb775fdc2d7c80700b224291ba42699ef685 100755 (executable)
@@ -216,7 +216,7 @@ sub single {
     my $title;
 
     if(defined($f)) {
-        if(!open($fh, "<:crlf", "$f")) {
+        if(!open($fh, "<:crlf", $f)) {
             print STDERR "cd2nroff failed to open '$f' for reading: $!\n";
             return 1;
         }
index 5fd146d0b822b89d3cbae7f622abf66d7aa6a4d0..1ea0f42f255ff751feaa253a3364b40a7fea9e37 100755 (executable)
@@ -35,7 +35,7 @@ sub convert {
     closedir $dh;
 
     for my $cd (@cd) {
-        my $nroff = "$cd";
+        my $nroff = $cd;
         $nroff =~ s/\.md\z/.3/;
         print "$dir/$cd = $dir/$nroff\n";
         system('./scripts/cd2nroff', ('-d', $dir, "$dir/$cd"));
index 727a61c8bd28395a1fd35d9151a6825c958acc23..04b4793b4177aff4cf6600406c4b9ed4e097c9e4 100755 (executable)
@@ -412,7 +412,7 @@ readskiplist();
 readlocalfile($file);
 
 do {
-    if("$wlist" !~ / $file /) {
+    if($wlist !~ / $file /) {
         my $fullname = $file;
         $fullname = "$dir/$file" if($fullname !~ '^\.?\.?/');
         scanfile($fullname);
index 2045f0f802247423e5fd4bb4fbb3e3fbfb916956..7b260927418e239fa5afa022695fb1679b216e99 100755 (executable)
@@ -67,7 +67,7 @@ my $contribs = $acontribs - $bcontribs;
 # number of setops:
 sub setopts {
     my ($f)=@_;
-    open(H, "$f");
+    open(H, $f);
     my $opts;
     while(<H>) {
         if(/^  CURLOPT(|DEPRECATED)\(/ && ($_ !~ /OBSOLETE/)) {
index 835a02d497d0c2558c3f4366785b6dcf99b39e2c..4569b764d789bd08b3433f58e6c8119b6592cb40 100755 (executable)
@@ -154,7 +154,7 @@ sub storelink {
 sub findlinks {
     my ($f) = @_;
     my $line = 1;
-    open(F, "<:crlf", "$f") ||
+    open(F, "<:crlf", $f) ||
         return;
 
     # is it a markdown extension?
index 5f10d67f4b57f8f1d1ead863e2096114c9acc548..c2baaf11952830c6e0f7dcbcded34eb40605688b 100755 (executable)
@@ -166,7 +166,7 @@ sub HELP_MESSAGE() {
     print "\t-b\tbackup an existing version of ca-bundle.crt\n";
     print "\t-d\tspecify Mozilla tree to pull certdata.txt or custom URL\n";
     print "\t\t  Valid names are:\n";
-    print "\t\t    ", join(", ", map { ($_ =~ m/$opt_d/) ? "$_ (default)" : "$_" } sort keys %urls), "\n";
+    print "\t\t    ", join(", ", map { ($_ =~ m/$opt_d/) ? "$_ (default)" : $_ } sort keys %urls), "\n";
     print "\t-f\tforce rebuild even if certdata.txt is current\n";
     print "\t-i\tprint version info about used modules\n";
     print "\t-k\tallow URLs other than HTTPS, enable HTTP fallback (insecure)\n";
@@ -478,7 +478,7 @@ my @precert;
 my $cka_value;
 my $valid = 0;
 
-open(TXT,"$txt") or die "Could not open $txt: $!\n";
+open(TXT, $txt) or die "Could not open $txt: $!\n";
 while(<TXT>) {
     if(/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) {
         print CRT;
index b0308b6ef071200b1420dae3b3700245d76cadb2..51b6974b8dfb21d58c4ea8e87b4ef96281d10f4d 100755 (executable)
@@ -43,7 +43,7 @@ my $nroff2cd = "0.1"; # to keep check
 
 sub single {
     my ($f)=@_;
-    open(F, "<:crlf", "$f") ||
+    open(F, "<:crlf", $f) ||
         return 1;
     my $line;
     my $title;
@@ -67,7 +67,7 @@ sub single {
                 # remove leading directory
                 $f =~ s/(.*?\/)//;
                 close(F);
-                open(F, "<:crlf", "$f") || return 1;
+                open(F, "<:crlf", $f) || return 1;
             }
             if($d =~ /^\.TH ([^ ]*) (\d) \"(.*?)\" ([^ \n]*)/) {
                 # header, this needs to be the first thing after leading comments
index 46adb6136a506a7bcbfb78c8f9366e47102025b7..ed9958907445f46fada661f53b8de00e555e1345 100755 (executable)
@@ -78,7 +78,7 @@ sub logmsg {
             # use \r\n for WSL shell
             $line =~ s/\r?\n$/\r\n/g;
         }
-        print "$line";
+        print $line;
     }
 }
 
index cfb65913d26970a226aab24ac20308dccfeeb0c7..a3553c79835a58881a6df76d3d05d0aa053003cd 100755 (executable)
@@ -789,7 +789,7 @@ sub EHLO_smtp {
 
         for my $am (@auth_mechs) {
             if(!$mechs) {
-                $mechs = "$am";
+                $mechs = $am;
             }
             else {
                 $mechs .= " $am";
@@ -940,7 +940,7 @@ sub DATA_smtp {
 
         logmsg "Store test number $testno in $filename\n";
 
-        open(my $file, ">", "$filename") ||
+        open(my $file, ">", $filename) ||
             return 0; # failed to open output
 
         my $line;
@@ -1290,7 +1290,7 @@ sub APPEND_imap {
 
         logmsg "Store test number $testno in $filename\n";
 
-        open(my $file, ">", "$filename") ||
+        open(my $file, ">", $filename) ||
             return 0; # failed to open output
 
         my $received = 0;
@@ -1709,7 +1709,7 @@ sub CAPA_pop3 {
 
     for my $am (@auth_mechs) {
         if(!$mechs) {
-            $mechs = "$am";
+            $mechs = $am;
         }
         else {
             $mechs .= " $am";
@@ -2399,7 +2399,7 @@ sub STOR_ftp {
 
     sendcontrol "125 Gimme gimme gimme!\r\n";
 
-    open(my $file, ">", "$filename") ||
+    open(my $file, ">", $filename) ||
         return 0; # failed to open output
 
     my $line;
@@ -2795,7 +2795,7 @@ sub nodataconn_str {
     $str = 'NODATACONN425' if($nodataconn425);
     $str = 'NODATACONN421' if($nodataconn421);
     $str = 'NODATACONN150' if($nodataconn150);
-    return "$str";
+    return $str;
 }
 
 #**********************************************************************
@@ -3085,7 +3085,7 @@ if($proto eq 'ftp') {
 $srvrname = servername_str($proto, $ipvnum, $idnum);
 $serverlogs_lockfile = "$logdir/$LOCKDIR/${srvrname}.lock";
 
-$idstr = "$idnum" if($idnum > 1);
+$idstr = $idnum if($idnum > 1);
 
 protocolsetup($proto);
 
@@ -3097,7 +3097,7 @@ startsf();
 # actual port
 if($portfile && !$port) {
     my $aport;
-    open(my $p, "<", "$portfile");
+    open(my $p, "<", $portfile);
     $aport = <$p>;
     close($p);
     $port = 0 + $aport;
@@ -3105,7 +3105,7 @@ if($portfile && !$port) {
 
 logmsg sprintf("%s server listens on port IPv${ipvnum}/${port}\n", uc($proto));
 
-open(my $pid, ">", "$pidfile");
+open(my $pid, ">", $pidfile);
 print $pid $$."\n";
 close($pid);
 
index 2aa5aed2e30894b9a8efa4ec3cf41a3cf4fad865..3329b13a3493b6da4e20c9026a35a9b07020b41d 100644 (file)
@@ -230,7 +230,7 @@ sub loadtest {
     undef @xml;
     $xmlfile = "";
 
-    if(open(my $xmlh, "<", "$file")) {
+    if(open(my $xmlh, "<", $file)) {
         if($original) {
             binmode $xmlh, ':crlf';
         }
@@ -311,7 +311,7 @@ sub checktest {
 sub savetest {
     my ($file)=@_;
 
-    if(open(my $xmlh, ">", "$file")) {
+    if(open(my $xmlh, ">", $file)) {
         binmode $xmlh; # for crapage systems, use binary
         for(@xml) {
             print $xmlh $_;
@@ -407,7 +407,7 @@ sub compareparts {
 sub writearray {
     my ($filename, $arrayref)=@_;
 
-    open(my $temp, ">", "$filename") || die "Failure writing file";
+    open(my $temp, ">", $filename) || die "Failure writing file";
     binmode($temp,":raw");  # Cygwin fix
     for(@$arrayref) {
         print $temp $_;
@@ -422,7 +422,7 @@ sub loadarray {
     my ($filename)=@_;
     my @array;
 
-    if(open(my $temp, "<", "$filename")) {
+    if(open(my $temp, "<", $filename)) {
         while(<$temp>) {
             push @array, $_;
         }
index e9a847c8cf69297d44a6cbd3114656ca60ed5988..2a395da2e0fd0897febea350bc63d1e1c6aa07a2 100644 (file)
@@ -68,7 +68,7 @@ sub memanalyze {
     $memsum = 0; # the total number of memory allocated over the lifetime
     $maxmem = 0; # the high water mark
 
-    open(my $fileh, "<", "$file") or return ();
+    open(my $fileh, "<", $file) or return ();
 
     if($showlimit) {
         while(<$fileh>) {
index 299bce0d8a5be83075ef910c72035fcb1588f030..ee5fc52d6dc4d8219dc37238478dacca51dd7e29 100644 (file)
@@ -86,7 +86,7 @@ sub pidfromfile {
     my $waits = 0;
     # wait at max 15 seconds for the file to exist and have valid content
     while(!$pid && ($waits <= ($timeout_sec * 10))) {
-        if(-f $pidfile && -s $pidfile && open(my $pidfh, "<", "$pidfile")) {
+        if(-f $pidfile && -s $pidfile && open(my $pidfh, "<", $pidfile)) {
             $pid = 0 + <$pidfh>;
             close($pidfh);
             $pid = 0 if($pid < 0);
@@ -137,7 +137,7 @@ sub pidexists {
                     my $filter = "PID eq $pid";
                     # https://ss64.com/nt/tasklist.html
                     my $result = `tasklist -fi \"$filter\" 2>$dev_null`;
-                    if(index($result, "$pid") != -1) {
+                    if(index($result, $pid) != -1) {
                         return -$pid;
                     }
                 }
@@ -478,7 +478,7 @@ sub set_advisor_read_lock {
     my ($filename) = @_;
 
     my $fileh;
-    if(open($fileh, ">", "$filename") && close($fileh)) {
+    if(open($fileh, ">", $filename) && close($fileh)) {
         return;
     }
     printf "Error creating lock file $filename error: $!\n";
index 94ddc77a8faed8f0e00709466607e34104dc5c0b..2ecaba8ef477153af9a3debd2bb7ee7dee6eb641 100644 (file)
@@ -263,7 +263,7 @@ sub event_loop {
 #
 sub checktestcmd {
     my ($cmd)=@_;
-    my @testpaths=($LIBDIR . ".libs", "$LIBDIR");
+    my @testpaths=($LIBDIR . ".libs", $LIBDIR);
     return checkcmd($cmd, @testpaths);
 }
 
@@ -647,7 +647,7 @@ sub singletest_preprocess {
     @entiretest = prepro($testnum, @entiretest);
 
     # save the new version
-    open(my $fulltesth, ">", "$otest") || die "Failure writing test file";
+    open(my $fulltesth, ">", $otest) || die "Failure writing test file";
     foreach my $bytes (@entiretest) {
         print $fulltesth pack('a*', $bytes) or die "Failed to print '$bytes': $!";
     }
@@ -671,7 +671,7 @@ sub singletest_setenv {
             if($content =~ /^=(.*)/) {
                 # assign it
                 $content = $1;
-                $ENV{$var} = "$content";
+                $ENV{$var} = $content;
                 logmsg "setenv $var = $content\n" if($verbose);
             }
             else {
@@ -775,7 +775,7 @@ sub singletest_prepare {
                     mkdir $d; # 0777
                 }
             }
-            if(open(my $outfile, ">", "$filename")) {
+            if(open(my $outfile, ">", $filename)) {
                 binmode $outfile; # for crapage systems, use binary
 
                 if($fileattr{'nonewline'}) {
@@ -845,14 +845,14 @@ sub singletest_run {
     my $fail_due_event_based = $run_event_based;
     if($cmdtype eq "perl") {
         # run the command line prepended with "perl"
-        $cmdargs ="$cmd";
+        $cmdargs =$cmd;
         $CMDLINE = "$perl ";
         $tool=$CMDLINE;
         $disablevalgrind=1;
     }
     elsif($cmdtype eq "shell") {
         # run the command line prepended with "/bin/sh"
-        $cmdargs ="$cmd";
+        $cmdargs =$cmd;
         $CMDLINE = "/bin/sh ";
         $tool=$CMDLINE;
         $disablevalgrind=1;
@@ -1048,7 +1048,7 @@ sub singletest_run {
     }
     else {
         # Convert the raw result code into a more useful one
-        ($cmdres, $dumped_core) = normalize_cmdres(runclient("$CMDLINE"));
+        ($cmdres, $dumped_core) = normalize_cmdres(runclient($CMDLINE));
     }
 
     # restore contents
@@ -1152,7 +1152,7 @@ sub singletest_postcheck {
         chomp $cmd;
         if($cmd) {
             logmsg "postcheck $cmd\n" if($verbose);
-            my $rc = runclient("$cmd");
+            my $rc = runclient($cmd);
             # Must run the postcheck command in torture mode in order
             # to clean up, but the result cannot be relied upon.
             if($rc != 0 && !$torture) {
index 2a180bfeb411a72640a665b9cb9abceac8f2a395..d5e43a6427f3a24e004cbf3e627a83cca6a9ae86 100755 (executable)
@@ -206,7 +206,7 @@ sub logmsg {
             # use \r\n for WSL shell
             $line =~ s/\r?\n$/\r\n/g;
         }
-        print "$line";
+        print $line;
     }
 }
 
@@ -359,7 +359,7 @@ sub cleardir {
         # Do not clear the $PIDDIR or $LOCKDIR since those need to live beyond
         # one test
         if(($file !~ /^(\.|\.\.)\z/) &&
-            "$file" ne $PIDDIR && "$file" ne $LOCKDIR) {
+            $file ne $PIDDIR && $file ne $LOCKDIR) {
             if(-d "$dir/$file") {
                 if(!cleardir("$dir/$file")) {
                     $done = 0;
@@ -370,7 +370,7 @@ sub cleardir {
             }
             else {
                 # Ignore stunnel since we cannot do anything about its locks
-                if(!unlink("$dir/$file") && "$file" !~ /_stunnel\.log$/) {
+                if(!unlink("$dir/$file") && $file !~ /_stunnel\.log$/) {
                     $done = 0;
                 }
             }
@@ -389,7 +389,7 @@ sub showdiff {
     my $file1="$logdir/check-generated";
     my $file2="$logdir/check-expected";
 
-    open(my $temp, ">", "$file1") || die "Failure writing diff file";
+    open(my $temp, ">", $file1) || die "Failure writing diff file";
     for(@$firstref) {
         my $l = $_;
         $l =~ s/\r/[CR]/g;
@@ -400,7 +400,7 @@ sub showdiff {
     }
     close($temp) || die "Failure writing diff file";
 
-    open($temp, ">", "$file2") || die "Failure writing diff file";
+    open($temp, ">", $file2) || die "Failure writing diff file";
     for(@$secondref) {
         my $l = $_;
         $l =~ s/\r/[CR]/g;
@@ -530,7 +530,7 @@ sub checksystemfeatures {
     $ENV{'SOURCE_DATE_EPOCH'} = $current_time;
     $DATE = strftime "%Y-%m-%d", gmtime($current_time);
 
-    open(my $versout, "<", "$curlverout");
+    open(my $versout, "<", $curlverout);
     @version = <$versout>;
     close($versout);
 
@@ -771,9 +771,9 @@ sub checksystemfeatures {
             logmsg sprintf("command exited with value %d \n", $versretval >> 8);
         }
         logmsg "contents of $curlverout: \n";
-        displaylogcontent("$curlverout");
+        displaylogcontent($curlverout);
         logmsg "contents of $curlvererr: \n";
-        displaylogcontent("$curlvererr");
+        displaylogcontent($curlvererr);
         die "Could not get curl's version";
     }
 
@@ -1260,7 +1260,7 @@ sub singletest_check {
 
     my $loadfile = $hash{'loadfile'};
     if($loadfile) {
-        open(my $tmp, "<", "$loadfile") || die "Cannot open file $loadfile: $!";
+        open(my $tmp, "<", $loadfile) || die "Cannot open file $loadfile: $!";
         @validstdout = <$tmp>;
         close($tmp);
 
@@ -1856,7 +1856,7 @@ sub singletest_check {
     }
     if($valgrind) {
         if($usedvalgrind) {
-            if(!opendir(DIR, "$logdir")) {
+            if(!opendir(DIR, $logdir)) {
                 logmsg "ERROR: unable to read $logdir\n";
                 # timestamp test result verification end
                 $timevrfyend{$testnum} = Time::HiRes::time();
@@ -2674,7 +2674,7 @@ if($valgrind) {
         if(($? >> 8)) {
             $valgrind_tool="";
         }
-        open(my $curlh, "<", "$CURL");
+        open(my $curlh, "<", $CURL);
         my $l = <$curlh>;
         if($l =~ /^\#\!/) {
             # A shell script. This is typically when built with libtool,
@@ -2700,7 +2700,7 @@ if($valgrind) {
 
 if($gdbthis) {
     # open the executable curl and read the first 4 bytes of it
-    open(my $check, "<", "$CURL");
+    open(my $check, "<", $CURL);
     my $c;
     sysread $check, $c, 4;
     close($check);
@@ -2779,7 +2779,7 @@ sub disabledtests {
     my ($file) = @_;
     my @input;
 
-    if(open(my $disabledh, "<", "$file")) {
+    if(open(my $disabledh, "<", $file)) {
         while(<$disabledh>) {
             if(/^ *\#/) {
                 # allow comments
@@ -2885,7 +2885,7 @@ if($scrambleorder) {
 # and excessively long files are elided
 sub displaylogcontent {
     my ($file)=@_;
-    if(open(my $single, "<", "$file")) {
+    if(open(my $single, "<", $file)) {
         my $linecount = 0;
         my $truncate;
         my @tail;
@@ -2924,7 +2924,7 @@ sub displaylogcontent {
 sub displaylogs {
     my ($runnerid, $testnum)=@_;
     my $logdir = getrunnerlogdir($runnerid);
-    opendir(DIR, "$logdir") ||
+    opendir(DIR, $logdir) ||
         die "cannot open dir: $!";
     my @logs = readdir(DIR);
     closedir(DIR);
index 4df9ce8cbb5c27e4c8af98e7a7d13247e3f7ae46..9cd963261ffc22bc96c612ebe76cefd4a17612e4 100755 (executable)
@@ -211,7 +211,7 @@ my $host_ip = ($ipvnum == 6) ? '::1' : '127.0.0.1';
 # Find out version info for the given stunnel binary
 #
 foreach my $veropt (('-version', '-V')) {
-    foreach my $verstr (qx("$stunnel" $veropt 2>&1)) {
+    foreach my $verstr (qx($stunnel $veropt 2>&1)) {
         if($verstr =~ /^stunnel (\d+)\.(\d+) on /) {
             $ver_major = $1;
             $ver_minor = $2;
@@ -225,7 +225,7 @@ foreach my $veropt (('-version', '-V')) {
     last if($ver_major);
 }
 if((!$ver_major) || !defined($ver_minor)) {
-    if(-x "$stunnel" && ! -d "$stunnel") {
+    if(-x $stunnel && ! -d $stunnel) {
         print "$ssltext Unknown stunnel version\n";
     }
     else {
@@ -302,7 +302,7 @@ if($stunnel_version >= 400) {
     $SIG{INT} = \&exit_signal_handler;
     $SIG{TERM} = \&exit_signal_handler;
     # stunnel configuration file
-    if(open(my $stunconf, ">", "$conffile")) {
+    if(open(my $stunconf, ">", $conffile)) {
         print $stunconf "cert = $certfile\n";
         print $stunconf "debug = $loglevel\n";
         print $stunconf "socket = $socketopt\n";
@@ -337,7 +337,7 @@ if($stunnel_version >= 400) {
         print uc($proto) ." server (stunnel $ver_major.$ver_minor)\n";
         print "cmd: $cmd\n";
         print "stunnel config at $conffile:\n";
-        open (my $writtenconf, '<', "$conffile") or die "$ssltext could not open the config file after writing\n";
+        open (my $writtenconf, '<', $conffile) or die "$ssltext could not open the config file after writing\n";
         print <$writtenconf>;
         print "\n";
         close ($writtenconf);
@@ -355,7 +355,7 @@ print STDERR "RUN: $cmd\n" if($verbose);
 #
 if($tstunnel_windows) {
     # Fake pidfile for tstunnel on Windows.
-    if(open(my $out, ">", "$pidfile")) {
+    if(open(my $out, ">", $pidfile)) {
         print $out $$ . "\n";
         close($out);
     }
index 272e0386cf06c5288f14782072ca7c5f4d107128..3f345ad74a4454fdc3fbb8373dd30a5b58614d43 100644 (file)
@@ -83,7 +83,7 @@ sub logmsg {
     # we see warnings on Windows run that $logfile is used uninitialized
     # TODO: not found yet where this comes from
     $logfile = "serverhelp_uninitialized.log" if(!$logfile);
-    if(open(my $logfilefh, ">>", "$logfile")) {
+    if(open(my $logfilefh, ">>", $logfile)) {
         print $logfilefh $now;
         print $logfilefh @_;
         close($logfilefh);
@@ -165,7 +165,7 @@ sub servername_canon {
 sub server_pidfilename {
     my ($piddir, $proto, $ipver, $idnum) = @_;
     my $trailer = '_server.pid';
-    return "${piddir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
+    return "${piddir}/". servername_canon($proto, $ipver, $idnum) . $trailer;
 }
 
 #***************************************************************************
@@ -174,7 +174,7 @@ sub server_pidfilename {
 sub server_portfilename {
     my ($piddir, $proto, $ipver, $idnum) = @_;
     my $trailer = '_server.port';
-    return "${piddir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
+    return "${piddir}/". servername_canon($proto, $ipver, $idnum) . $trailer;
 }
 
 #***************************************************************************
@@ -184,7 +184,7 @@ sub server_logfilename {
     my ($logdir, $proto, $ipver, $idnum) = @_;
     my $trailer = '_server.log';
     $trailer = '_stunnel.log' if(lc($proto) =~ /^(ftp|http|imap|pop3|smtp)s$/);
-    return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
+    return "${logdir}/". servername_canon($proto, $ipver, $idnum) . $trailer;
 }
 
 #***************************************************************************
@@ -193,7 +193,7 @@ sub server_logfilename {
 sub server_cmdfilename {
     my ($logdir, $proto, $ipver, $idnum) = @_;
     my $trailer = '_server.cmd';
-    return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
+    return "${logdir}/". servername_canon($proto, $ipver, $idnum) . $trailer;
 }
 
 #***************************************************************************
@@ -202,7 +202,7 @@ sub server_cmdfilename {
 sub server_inputfilename {
     my ($logdir, $proto, $ipver, $idnum) = @_;
     my $trailer = '_server.input';
-    return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
+    return "${logdir}/". servername_canon($proto, $ipver, $idnum) . $trailer;
 }
 
 #***************************************************************************
@@ -211,7 +211,7 @@ sub server_inputfilename {
 sub server_outputfilename {
     my ($logdir, $proto, $ipver, $idnum) = @_;
     my $trailer = '_server.output';
-    return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
+    return "${logdir}/". servername_canon($proto, $ipver, $idnum) . $trailer;
 }
 
 #***************************************************************************
@@ -248,7 +248,7 @@ sub mainsockf_pidfilename {
     die "unsupported protocol: '$proto'" unless($proto &&
         (lc($proto) =~ /^(ftp|imap|pop3|smtp)s?$/));
     my $trailer = (lc($proto) =~ /^ftps?$/) ? '_sockctrl.pid' : '_sockfilt.pid';
-    return "${piddir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
+    return "${piddir}/". servername_canon($proto, $ipver, $idnum) . $trailer;
 }
 
 #***************************************************************************
@@ -259,7 +259,7 @@ sub mainsockf_logfilename {
     die "unsupported protocol: '$proto'" unless($proto &&
         (lc($proto) =~ /^(ftp|imap|pop3|smtp)s?$/));
     my $trailer = (lc($proto) =~ /^ftps?$/) ? '_sockctrl.log' : '_sockfilt.log';
-    return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
+    return "${logdir}/". servername_canon($proto, $ipver, $idnum) . $trailer;
 }
 
 #***************************************************************************
@@ -270,7 +270,7 @@ sub datasockf_pidfilename {
     die "unsupported protocol: '$proto'" unless($proto &&
         (lc($proto) =~ /^ftps?$/));
     my $trailer = '_sockdata.pid';
-    return "${piddir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
+    return "${piddir}/". servername_canon($proto, $ipver, $idnum) . $trailer;
 }
 
 #***************************************************************************
@@ -281,7 +281,7 @@ sub datasockf_logfilename {
     die "unsupported protocol: '$proto'" unless($proto &&
         (lc($proto) =~ /^ftps?$/));
     my $trailer = '_sockdata.log';
-    return "${logdir}/". servername_canon($proto, $ipver, $idnum) ."$trailer";
+    return "${logdir}/". servername_canon($proto, $ipver, $idnum) . $trailer;
 }
 
 #***************************************************************************
index 7fee69a536742f245adab4ca822413a3b85db20d..8c183a53667d2ab92b74870a8c803397128221e6 100644 (file)
@@ -360,7 +360,7 @@ sub startnew {
 
     # Ugly hack but ssh client and gnutls-serv do not support pid files
     if($fakepidfile) {
-        if(open(my $out, ">", "$pidfile")) {
+        if(open(my $out, ">", $pidfile)) {
             print $out $child . "\n";
             close($out) || die "Failure writing pidfile";
             logmsg "startnew: $pidfile faked with pid=$child\n" if($verbose);
@@ -560,7 +560,7 @@ sub verifyhttp {
 
     if($res && $verbose) {
         logmsg "RUN: curl command returned $res\n";
-        if(open(my $file, "<", "$verifylog")) {
+        if(open(my $file, "<", $verifylog)) {
             while(my $string = <$file>) {
                 logmsg "RUN: $string" if($string !~ /^([ \t]*)$/);
             }
@@ -569,7 +569,7 @@ sub verifyhttp {
     }
 
     my $data;
-    if(open(my $file, "<", "$verifyout")) {
+    if(open(my $file, "<", $verifyout)) {
         while(my $string = <$file>) {
             $data = $string;
             last; # only want first line
@@ -703,7 +703,7 @@ sub verifyrtsp {
 
     if($res && $verbose) {
         logmsg "RUN: curl command returned $res\n";
-        if(open(my $file, "<", "$verifylog")) {
+        if(open(my $file, "<", $verifylog)) {
             while(my $string = <$file>) {
                 logmsg "RUN: $string" if($string !~ /^[ \t]*$/);
             }
@@ -712,7 +712,7 @@ sub verifyrtsp {
     }
 
     my $data;
-    if(open(my $file, "<", "$verifyout")) {
+    if(open(my $file, "<", $verifyout)) {
         while(my $string = <$file>) {
             $data = $string;
             last; # only want first line
@@ -777,7 +777,7 @@ sub verifysftp {
     my $cmd = "\"$sftp\" -b $LOGDIR/$PIDDIR/$sftpcmds -F $LOGDIR/$PIDDIR/$sftpconfig -S \"$ssh\" $ip > $sftplog 2>&1";
     my $res = runclient($cmd);
     # Search for pwd command response in log file
-    if(open(my $sftplogfile, "<", "$sftplog")) {
+    if(open(my $sftplogfile, "<", $sftplog)) {
         while(<$sftplogfile>) {
             if(/^Remote working directory: /) {
                 $verified = 1;
@@ -836,7 +836,7 @@ sub verifyhttptls {
 
     if($res && $verbose) {
         logmsg "RUN: curl command returned $res\n";
-        if(open(my $file, "<", "$verifylog")) {
+        if(open(my $file, "<", $verifylog)) {
             while(my $string = <$file>) {
                 logmsg "RUN: $string" if($string !~ /^([ \t]*)$/);
             }
@@ -845,7 +845,7 @@ sub verifyhttptls {
     }
 
     my $data;
-    if(open(my $file, "<", "$verifyout")) {
+    if(open(my $file, "<", $verifyout)) {
         while(my $string = <$file>) {
             $data .= $string;
         }
@@ -1103,7 +1103,7 @@ sub runhttpserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -1137,7 +1137,7 @@ sub runhttpserver {
     if($httppid <= 0 || !pidexists($httppid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0, 0);
     }
@@ -1147,7 +1147,7 @@ sub runhttpserver {
     $port = $port_or_path = pidfromfile($portfile, $SERVER_TIMEOUT_SEC);
     if(!$port) {
         logmsg "RUN: timeout for $srvrname to produce port file $portfile\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0, 0);
     }
@@ -1181,7 +1181,7 @@ sub runhttp2server {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -1203,7 +1203,7 @@ sub runhttp2server {
 
     if($http2pid <= 0 || !pidexists($http2pid)) {
         # it is NOT alive
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         $http2pid = $pid2 = 0;
         logmsg "RUN: failed to start the $srvrname server\n";
@@ -1242,7 +1242,7 @@ sub runhttp3server {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -1264,7 +1264,7 @@ sub runhttp3server {
 
     if($http3pid <= 0 || !pidexists($http3pid)) {
         # it is NOT alive
-        stopserver($server, "$pid3");
+        stopserver($server, $pid3);
         $doesntrun{$pidfile} = 1;
         $http3pid = $pid3 = 0;
         logmsg "RUN: failed to start the $srvrname server\n";
@@ -1308,7 +1308,7 @@ sub runhttpsserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -1373,7 +1373,7 @@ sub runhttpsserver {
 sub runhttptlsserver {
     my ($verb, $ipv6) = @_;
     my $proto = "httptls";
-    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
+    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? $HOST6IP : $HOSTIP;
     my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
     my $idnum = 1;
 
@@ -1392,7 +1392,7 @@ sub runhttptlsserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -1413,7 +1413,7 @@ sub runhttptlsserver {
 
     if($httptlspid <= 0 || !pidexists($httptlspid)) {
         # it is NOT alive
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         $httptlspid = $pid2 = 0;
         logmsg "RUN: failed to start the $srvrname server\n";
@@ -1439,7 +1439,7 @@ sub runpingpongserver {
         return (4, 0, 0);
     }
 
-    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
+    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? $HOST6IP : $HOSTIP;
     my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
     my $idnum = ($id && ($id =~ /^(\d+)$/) && ($id > 1)) ? $id : 1;
 
@@ -1455,7 +1455,7 @@ sub runpingpongserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -1478,7 +1478,7 @@ sub runpingpongserver {
     if($ftppid <= 0 || !pidexists($ftppid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0);
     }
@@ -1487,7 +1487,7 @@ sub runpingpongserver {
     my $port = pidfromfile($portfile, $SERVER_TIMEOUT_SEC);
     if(!$port) {
         logmsg "RUN: timeout for $srvrname to produce port file $portfile\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0, 0);
     }
@@ -1507,7 +1507,7 @@ sub runpingpongserver {
 #
 sub runsecureserver {
     my ($verb, $ipv6, $certfile, $proto, $clearport) = @_;
-    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
+    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? $HOST6IP : $HOSTIP;
     my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
     my $idnum = 1;
 
@@ -1526,7 +1526,7 @@ sub runsecureserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -1597,7 +1597,7 @@ sub runtftpserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -1621,7 +1621,7 @@ sub runtftpserver {
     if($tftppid <= 0 || !pidexists($tftppid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0, 0);
     }
@@ -1629,7 +1629,7 @@ sub runtftpserver {
     my $port = pidfromfile($portfile, $SERVER_TIMEOUT_SEC);
     if(!$port) {
         logmsg "RUN: timeout for $srvrname to produce port file $portfile\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0, 0);
     }
@@ -1668,7 +1668,7 @@ sub rundnsserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -1693,7 +1693,7 @@ sub rundnsserver {
     if($dnspid <= 0 || !pidexists($dnspid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0, 0);
     }
@@ -1701,7 +1701,7 @@ sub rundnsserver {
     my $port = pidfromfile($portfile, $SERVER_TIMEOUT_SEC);
     if(!$port) {
         logmsg "RUN: timeout for $srvrname to produce port file $portfile\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0, 0);
     }
@@ -1741,7 +1741,7 @@ sub runrtspserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -1764,7 +1764,7 @@ sub runrtspserver {
     if($rtsppid <= 0 || !pidexists($rtsppid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0, 0);
     }
@@ -1772,7 +1772,7 @@ sub runrtspserver {
     my $port = pidfromfile($portfile, $SERVER_TIMEOUT_SEC);
     if(!$port) {
         logmsg "RUN: timeout for $srvrname to produce port file $portfile\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0, 0);
     }
@@ -1816,7 +1816,7 @@ sub runsshserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -1848,7 +1848,7 @@ sub runsshserver {
     # zero pid2 above.
     if($sshpid <= 0 || !pidexists($sshpid)) {
         # it is NOT alive
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         $sshpid = $pid2 = 0;
         logmsg "RUN: failed to start the $srvrname server on $port\n";
@@ -1928,7 +1928,7 @@ sub runmqttserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -1949,7 +1949,7 @@ sub runmqttserver {
     if($sockspid <= 0 || !pidexists($sockspid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0);
     }
@@ -1957,7 +1957,7 @@ sub runmqttserver {
     my $mqttport = pidfromfile($portfile, $SERVER_TIMEOUT_SEC);
     if(!$mqttport) {
         logmsg "RUN: timeout for $srvrname to produce port file $portfile\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0, 0);
     }
@@ -1990,7 +1990,7 @@ sub runsocksserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -2025,7 +2025,7 @@ sub runsocksserver {
     if($sockspid <= 0 || !pidexists($sockspid)) {
         # it is NOT alive
         logmsg "RUN: failed to start the $srvrname server\n";
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         return (1, 0, 0, 0);
     }
@@ -2035,7 +2035,7 @@ sub runsocksserver {
         $port = pidfromfile($portfile, $SERVER_TIMEOUT_SEC);
         if(!$port) {
             logmsg "RUN: timeout for $srvrname to produce port file $portfile\n";
-            stopserver($server, "$pid2");
+            stopserver($server, $pid2);
             $doesntrun{$pidfile} = 1;
             return (1, 0, 0, 0);
         }
@@ -2073,7 +2073,7 @@ sub rundictserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -2094,7 +2094,7 @@ sub rundictserver {
 
     if($dictpid <= 0 || !pidexists($dictpid)) {
         # it is NOT alive
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         $dictpid = $pid2 = 0;
         logmsg "RUN: failed to start the $srvrname server\n";
@@ -2134,7 +2134,7 @@ sub runsmbserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -2155,7 +2155,7 @@ sub runsmbserver {
 
     if($smbpid <= 0 || !pidexists($smbpid)) {
         # it is NOT alive
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         $smbpid = $pid2 = 0;
         logmsg "RUN: failed to start the $srvrname server\n";
@@ -2195,7 +2195,7 @@ sub runnegtelnetserver {
 
     my $pid = processexists($pidfile);
     if($pid > 0) {
-        stopserver($server, "$pid");
+        stopserver($server, $pid);
     }
     unlink($pidfile) if(-f $pidfile);
 
@@ -2215,7 +2215,7 @@ sub runnegtelnetserver {
 
     if($ntelpid <= 0 || !pidexists($ntelpid)) {
         # it is NOT alive
-        stopserver($server, "$pid2");
+        stopserver($server, $pid2);
         $doesntrun{$pidfile} = 1;
         $ntelpid = $pid2 = 0;
         logmsg "RUN: failed to start the $srvrname server\n";
@@ -2262,7 +2262,7 @@ sub responsive_http_server {
 #
 sub responsive_mqtt_server {
     my ($proto, $id, $verb, $ipv6) = @_;
-    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
+    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? $HOST6IP : $HOSTIP;
     my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
     my $idnum = ($id && ($id =~ /^(\d+)$/) && ($id > 1)) ? $id : 1;
 
@@ -2276,7 +2276,7 @@ sub responsive_mqtt_server {
 sub responsive_pingpong_server {
     my ($proto, $id, $verb, $ipv6) = @_;
     my $port;
-    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? "$HOST6IP" : "$HOSTIP";
+    my $ip = ($ipv6 && ($ipv6 =~ /6$/)) ? $HOST6IP : $HOSTIP;
     my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
     my $idnum = ($id && ($id =~ /^(\d+)$/) && ($id > 1)) ? $id : 1;
     my $protoip = $proto . ($ipvnum == 6? '6': '');
@@ -2368,12 +2368,12 @@ sub responsive_httptls_server {
     my $ipvnum = ($ipv6 && ($ipv6 =~ /6$/)) ? 6 : 4;
     my $proto = "httptls";
     my $port = protoport($proto);
-    my $ip = "$HOSTIP";
+    my $ip = $HOSTIP;
     my $idnum = 1;
 
     if($ipvnum == 6) {
         $port = protoport("httptls6");
-        $ip = "$HOST6IP";
+        $ip = $HOST6IP;
     }
 
     return &responsiveserver($proto, $ipvnum, $idnum, $ip, $port);
index f8cac3e75afeaed9dccec2f428d7153f0c5d70aa..a939670cdec196f6faabb4923f77c32fc954d229 100644 (file)
@@ -177,9 +177,9 @@ sub dump_array {
 sub display_file {
     my $filename = $_[0];
     print "=== Start of file $filename\n";
-    if(open(my $displayfh, "<", "$filename")) {
+    if(open(my $displayfh, "<", $filename)) {
         while(my $line = <$displayfh>) {
-            print "$line";
+            print $line;
         }
         close $displayfh;
     }
@@ -192,9 +192,9 @@ sub display_file {
 sub display_file_top {
     my $filename = $_[0];
     print "=== Top of file $filename\n";
-    if(open(my $displayfh, "<", "$filename")) {
+    if(open(my $displayfh, "<", $filename)) {
         my $line = <$displayfh>;
-        print "$line";
+        print $line;
         close $displayfh;
     }
     print "=== End of file $filename\n";
index 84baf6a52b5f626915d5449951b1acb1b3a81b58..770b6bd31c7cdf710a0a0ecc22f29f3ec7552a5c 100755 (executable)
@@ -1161,7 +1161,7 @@ logmsg "RUN: $cmd\n" if($verbose);
 #
 if($sshdid =~ /OpenSSH-Windows/) {
     # Fake pidfile for ssh server on Windows.
-    if(open(my $out, ">", "$pidfile")) {
+    if(open(my $out, ">", $pidfile)) {
         print $out $$ . "\n";
         close($out);
     }
index cf17167d4b4a87b1719164b63deba144d6897f2a..9561f701ab581a76997c97e51cb27f71f0f51d53 100755 (executable)
@@ -81,7 +81,7 @@ sub scanenum {
 
 sub scanheader {
     my ($f)=@_;
-    open my $h, "<", "$f";
+    open my $h, "<", $f;
     while(<$h>) {
         if(/^#define ((LIB|)CURL[A-Za-z0-9_]*)/) {
             push @syms, $1;
@@ -105,7 +105,7 @@ sub scanallheaders {
 sub checkmanpage {
     my ($m) = @_;
 
-    open(my $mh, "<", "$m");
+    open(my $mh, "<", $m);
     my $line = 1;
     while(<$mh>) {
         # strip off formatting
index 15982e659df91a9a4dc898bed7c1f56f27eaef09..40f18aaa2293455bca3f441b2e914b8ec15ac7b4 100755 (executable)
@@ -51,7 +51,7 @@ if(!defined $root) {
 }
 
 $root = "$root/include/curl";
-opendir(D, "$root") || die "Cannot open directory $root: $!\n";
+opendir(D, $root) || die "Cannot open directory $root: $!\n";
 my @dir = readdir(D);
 closedir(D);
 
@@ -77,7 +77,7 @@ foreach my $f (@incs) {
             my $decl = $1;
             $decl =~ s/\r$//;
             $decl =~ /([a-z_]+)$/;
-            push(@out, "$1");
+            push(@out, $1);
         }
         elsif(/^(^CURL_EXTERN .*)/) {
             # handle two-line declarations
@@ -91,7 +91,7 @@ foreach my $f (@incs) {
                 $decl =~ s/\r$//;
                 $first .= $decl;
                 $first =~ /([a-z_]+)$/;
-                push(@out, "$1");
+                push(@out, $1);
             }
             $first = "";
         }
index c1e4651420c7a5d6de43b63af7ccdc34d1240303..a11c9d03a3bac4f7674fb84c5f3c9b295f7aeb95 100755 (executable)
@@ -67,7 +67,7 @@ my %alias = (
 sub scanmdpage {
     my ($file, @words) = @_;
 
-    open(my $mh, "<", "$file") ||
+    open(my $mh, "<", $file) ||
         die "could not open $file";
     my @m;
     while(<$mh>) {
@@ -101,7 +101,7 @@ sub scanmdpage {
 my $r;
 
 # check for define aliases
-open($r, "<", "$curlh") ||
+open($r, "<", $curlh) ||
     die "no curl.h";
 while(<$r>) {
     if(/^\#define (CURL(OPT|INFO|MOPT)_\w+) (.*)/) {
@@ -113,7 +113,7 @@ close($r);
 my @curlopt;
 my @curlinfo;
 my @curlmopt;
-open($r, "<", "$syms") ||
+open($r, "<", $syms) ||
     die "no input file";
 while(<$r>) {
     chomp;
index addf0472042c6e5460959d9969064d440ba33e04..45da989ea667034bf2671e87959ae9ac1f6387c1 100755 (executable)
@@ -58,7 +58,7 @@ sub manpresent {
 
 sub file {
     my ($f) = @_;
-    open(my $fh, "<", "$f") ||
+    open(my $fh, "<", $f) ||
         die "test1140.pl could not open $f";
     my $line = 1;
     while(<$fh>) {
index cc8ca6ecc372c46b18bd649037e69537f1c4c1ef..6e2c9141afca7d7bd9771a4a2445a8b832dad693 100755 (executable)
@@ -79,7 +79,7 @@ my %deprecated = (
     CURLOPT_RANDOM_FILE => 1,
     );
 sub allsymbols {
-    open(my $f, "<", "$symbolsinversions") ||
+    open(my $f, "<", $symbolsinversions) ||
         die "$symbolsinversions: $|";
     while(<$f>) {
         if($_ =~ /^([^ ]*) +(.*)/) {
@@ -144,7 +144,7 @@ sub scanmanpage {
     my @separators;
     my @sepline;
 
-    open(my $m, "<", "$file") ||
+    open(my $m, "<", $file) ||
         die "test1173.pl could not open $file";
     if($file =~ /[\/\\](CURL|curl_)([^\/\\]*).3/) {
         # This is a man page for libcurl. It requires an example unless it is
index 83c3ee8ba5703dcd66705a0236ea6e621084f2f3..32377986a58528534c4e12917a66f358bff56ff6 100755 (executable)
@@ -39,7 +39,7 @@ my %manname;
 my %sourcename;
 my $error=0;
 
-open(my $m, "<", "$manpage");
+open(my $m, "<", $manpage);
 while(<$m>) {
     if($_ =~ / mask bit: (CURL_VERSION_[A-Z0-9_]+)/i) {
         $manversion{$1}++;
@@ -50,7 +50,7 @@ while(<$m>) {
 }
 close($m);
 
-open(my $h, "<", "$header");
+open(my $h, "<", $header);
 while(<$h>) {
     if($_ =~ /^\#define (CURL_VERSION_[A-Z0-9_]+)/i) {
         $headerversion{$1}++;
@@ -58,7 +58,7 @@ while(<$h>) {
 }
 close($h);
 
-open(my $s, "<", "$source");
+open(my $s, "<", $source);
 while(<$s>) {
     if($_ =~ /FEATURE\("([^"]*)"/) {
       $sourcename{$1}++;
index 5a0092ee7d9a6cf13ec8e2d5fa7228a03686c4e7..96f6d60b23e2703d214f860a13c401a2d8e44350 100755 (executable)
@@ -59,7 +59,7 @@ sub scan_header {
     my $incomment = 0;
     my $inenum = 0;
 
-    open(my $h, "<", "$f");
+    open(my $h, "<", $f);
     while(<$h>) {
         s/^\s*(.*?)\s*$/$1/;      # Trim.
         # Remove multi-line comment trail.
@@ -151,7 +151,7 @@ sub scan_man_for_opts {
     my $opt = "";
     my $line = "";
 
-    open(my $m, "<", "$f");
+    open(my $m, "<", $f);
     while(<$m>) {
         if($_ =~ /^\./) {
             # roff directive found: end current option paragraph.
@@ -187,7 +187,7 @@ sub scan_man_page {
     my ($path, $sym, $table)=@_;
     my $version = "X";
 
-    if(open(my $fh, "<", "$path")) {
+    if(open(my $fh, "<", $path)) {
         my $section = "";
         my $line = "";
 
index 4f7f520c22568fe2743e5dd63ba97a31b5635ef6..11c4b98646a20ea8dcfa2f60ad44afc87c794072 100755 (executable)
@@ -46,7 +46,7 @@ sub checkfile {
     if($f !~ /\.md\z/) {
         return;
     }
-    open(my $fh, "<", "$f");
+    open(my $fh, "<", $f);
     my $l;
     my $prevl = '';
     my $ignore = 0;
index 3d67908195b600cf72873fefb92f8193bc7001bf..4c4acb75aa84e39dbe73a84414b6701541c07968 100755 (executable)
@@ -66,7 +66,7 @@ our %pastversion;
 sub checkmanpage {
     my ($m) = @_;
 
-    open(my $mh, "<", "$m");
+    open(my $mh, "<", $m);
     my $line = 1;
     my $title;
     my $addedin;
index eae1f20510a240b5647628800995f82b4ad72f0e..78bb9a19e3e3f692f6ba7e7c9a4c4ed606e7873c 100755 (executable)
@@ -42,7 +42,7 @@ sub scan_header {
     my $incomment = 0;
     my @stringopts;
 
-    open(my $h, "<", "$f");
+    open(my $h, "<", $f);
     while(<$h>) {
         s/^\s*(.*?)\s*$/$1/;      # Trim.
         # Remove multi-line comment trail.
@@ -96,7 +96,7 @@ sub scan_wrapper_for_strings {
     my $inarmor = 0;
     my @stringopts;
 
-    open(my $h, "<", "$f");
+    open(my $h, "<", $f);
     while(<$h>) {
         if($_ =~ /(BEGIN|END) TRANSLATABLE STRING OPTIONS/) {
             $inarmor = $1 eq "BEGIN";
index a0b900282bfd380392cb165fd72ec5b7989c815f..e4ff5f860a477fb590cfbbd7df9c9f45242770bd 100755 (executable)
@@ -59,7 +59,7 @@ sub cmdfiles {
 sub mentions {
     my ($f) = @_;
     my @options;
-    open(my $fh, "<", "$f");
+    open(my $fh, "<", $f);
     while(<$fh>) {
         chomp;
         if(/(.*) +([0-9.]+)/) {
index 28614503af1a57c1cd3820d0df34df58b8f93ba7..198c41d8dc52d626470b0005c57d65d79267d50f 100755 (executable)
@@ -226,7 +226,7 @@ sub logit_spaced($) {
 
 sub mydie($){
     my $text=$_[0];
-    logit "$text";
+    logit $text;
     chdir $pwd; # cd back to the original root dir
 
     if($pwd && $build) {
@@ -237,7 +237,7 @@ sub mydie($){
     if(-r $buildlog) {
         # we have a build log output file left, remove it
         logit "removing the $buildlogname file";
-        unlink "$buildlog";
+        unlink $buildlog;
     }
     logit "ENDING HERE"; # last line logged!
     exit 1;
@@ -247,7 +247,7 @@ sub get_host_triplet {
   my $triplet;
   my $configfile = "$pwd/$build/lib/curl_config.h";
 
-  if(-f $configfile && -s $configfile && open(my $libconfigh, "<", "$configfile")) {
+  if(-f $configfile && -s $configfile && open(my $libconfigh, "<", $configfile)) {
       while(<$libconfigh>) {
           if($_ =~ /^\#define\s+CURL_OS\s+"*([^"][^"]*)"*\s*/) {
               $triplet = $1;
@@ -265,7 +265,7 @@ if($name && $email && $desc) {
     $infixed=4;
     $fixed=4;
 }
-elsif(open(my $f, "<", "$setupfile")) {
+elsif(open(my $f, "<", $setupfile)) {
     while(<$f>) {
         if(/(\w+)=(.*)/) {
             eval "\$$1=$2;";
@@ -310,7 +310,7 @@ if(!$confopts) {
 
 if($fixed < 4) {
     $fixed=4;
-    open(my $f, ">", "$setupfile") or die;
+    open(my $f, ">", $setupfile) or die;
     print $f "name='$name'\n";
     print $f "email='$email'\n";
     print $f "desc='$desc'\n";
@@ -385,7 +385,7 @@ if(-d $CURLDIR) {
 }
 
 # make the path absolute so we can use it everywhere
-$CURLDIR = File::Spec->rel2abs("$CURLDIR");
+$CURLDIR = File::Spec->rel2abs($CURLDIR);
 
 $build="build-$$";
 $buildlogname="buildlog-$$";
@@ -459,7 +459,7 @@ if($git) {
             logit "  $_";
         }
 
-        chdir "$CURLDIR";
+        chdir $CURLDIR;
     }
 
     if($nobuildconf) {
@@ -473,7 +473,7 @@ if($git) {
         # generate the build files
         logit "invoke autoreconf";
         open(my $f, "-|", "autoreconf -fi 2>&1") or die;
-        open(my $log, ">", "$buildlog") or die;
+        open(my $log, ">", $buildlog) or die;
         while(<$f>) {
             my $ll = $_;
             print $ll;
@@ -640,7 +640,7 @@ if(($have_embedded_ares) &&
         open($f, "-|", "$make -f Makefile.$targetos 2>&1") or die;
     }
     else {
-        logit "$make";
+        logit $make;
         open($f, "-|", "$make 2>&1") or die;
     }
     while(<$f>) {
@@ -660,7 +660,7 @@ if(($have_embedded_ares) &&
 }
 
 my $mkcmd = "$make -i" . ($targetos && !$configurebuild ? " $targetos" : "");
-logit "$mkcmd";
+logit $mkcmd;
 open($f, "-|", "$mkcmd 2>&1") or die;
 while(<$f>) {
     s/$pwd//g;
@@ -704,7 +704,7 @@ if($configurebuild && !$crosscompile) {
         chdir "$pwd/$build/docs/examples";
         logit_spaced "build examples";
         open($f, "-|", "$make -i 2>&1") or die;
-        open(my $log, ">", "$buildlog") or die;
+        open(my $log, ">", $buildlog) or die;
         while(<$f>) {
             s/$pwd//g;
             print;
@@ -721,7 +721,7 @@ if($configurebuild && !$crosscompile) {
     }
     logit "$make -k ${o}test-full";
     open($f, "-|", "$make -k ${o}test-full 2>&1") or die;
-    open(my $log, ">", "$buildlog") or die;
+    open(my $log, ">", $buildlog) or die;
     while(<$f>) {
         s/$pwd//g;
         print;
@@ -751,7 +751,7 @@ else {
             chdir "$pwd/$build/docs/examples";
             logit_spaced "build examples";
             open($f, "-|", "$make -i 2>&1") or die;
-            open(my $log, ">", "$buildlog") or die;
+            open(my $log, ">", $buildlog) or die;
             while(<$f>) {
                 s/$pwd//g;
                 print;
@@ -766,7 +766,7 @@ else {
             chdir "$pwd/$build/tests";
             logit_spaced "build test harness";
             open(my $f, "-|", "$make -i 2>&1") or die;
-            open(my $log, ">", "$buildlog") or die;
+            open(my $log, ">", $buildlog) or die;
             while(<$f>) {
                 s/$pwd//g;
                 print;
index 5de136b0da4cb95aa2a7d2b3a3fd98e9784965fe..1fbd8ecf64b5343bc4178099768d80675301d08d 100644 (file)
@@ -40,7 +40,7 @@ use File::Basename;
 sub valgrindparse {
     my ($file) = @_;
     my @o;
-    open(my $val, "<", "$file") ||
+    open(my $val, "<", $file) ||
         return;
     @o = <$val>;
     close($val);