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/