Check ARGV before subscripting it
[exim.git] / src / src / eximstats.src
index 76cfe7e9797194998546b1660a18682263a45359..8eb5cac896ec91e7f3895d2365bfe7fc973563df 100644 (file)
@@ -557,7 +557,7 @@ use File::Basename;
 # use Time::Local;  # PH/FANF
 use POSIX;
 
-if ($ARGV[0] eq '--version') {
+if (@ARGV and $ARGV[0] eq '--version') {
     print basename($0) . ": $0\n",
         "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n",
         "perl(runtime): $]\n";