X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fexigrep.src;h=5db01fe082e8303356dd9789c125ac4498a7981d;hb=1afce5bb5d0b9dec4fdf3cd8b6f339fc8d09339d;hp=118cd91b91d41c00fd21c76e99fb53b6458415b3;hpb=983da87847289c7f5373e4d5933d379f211b7613;p=exim.git diff --git a/src/src/exigrep.src b/src/src/exigrep.src index 118cd91b9..5db01fe08 100644 --- a/src/src/exigrep.src +++ b/src/src/exigrep.src @@ -233,7 +233,7 @@ GetOptions( 'version' => sub { print basename($0) . ": $0\n", "build: EXIM_RELEASE_VERSIONEXIM_VARIANT_VERSION\n", - "perl(runtime): $^V\n"; + "perl(runtime): $]\n"; exit 0; }, ) and @ARGV or pod2usage; @@ -244,7 +244,8 @@ $pattern = quotemeta $pattern if $literal; # Start a pager if output goes to a terminal if (-t 1 and $use_pager) { - foreach ($ENV{PAGER}//(), 'less', 'more') + # for perl >= v5.10.x: foreach ($ENV{PAGER}//(), 'less', 'more') + foreach (defined $ENV{PAGER} ? $ENV{PAGER} : (), 'less', 'more') { local $ENV{LESS} .= ' --no-init --quit-if-one-screen'; open(my $pager, '|-', $_) or next;