From: Dan Fandrich Date: Thu, 14 Sep 2023 23:23:08 +0000 (-0700) Subject: runtests: eliminate a warning on old perl versions X-Git-Tag: curl-8_4_0~193 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=989e1f35e881da8458d84674f57026507337d222;p=thirdparty%2Fcurl.git runtests: eliminate a warning on old perl versions The warning "Use of implicit split to @_ is deprecated" showed between perl versions about 5.8 through 5.11. --- diff --git a/tests/runner.pm b/tests/runner.pm index 8d86bd7714..8b61eb4b3b 100644 --- a/tests/runner.pm +++ b/tests/runner.pm @@ -753,7 +753,8 @@ sub singletest_prepare { my $path = $filename; # cut off the file name part $path =~ s/^(.*)\/[^\/]*/$1/; - my $nparts = scalar(split(/\//, $LOGDIR)); + my @ldparts = split(/\//, $LOGDIR); + my $nparts = @ldparts; my @parts = split(/\//, $path); if(join("/", @parts[0..$nparts-1]) eq $LOGDIR) { # the file is in $LOGDIR/