diff options
author | Heiko Schlittermann (HS12-RIPE) <hs@schlittermann.de> | 2017-11-01 22:38:43 +0100 |
---|---|---|
committer | Heiko Schlittermann (HS12-RIPE) <hs@schlittermann.de> | 2017-11-01 22:38:43 +0100 |
commit | b8d96756d873dab9685128f491399c535b652abe (patch) | |
tree | 64b665c8f3b29babfd54ee0616a4352dbcdbb0d8 /src | |
parent | 02721dcdf5dfcf96f62f6c657c9989b9ef991fa7 (diff) |
exigrep: we need to run with perl 5.8.x
The defined-or operator '//' does not exist yet.
Diffstat (limited to 'src')
-rw-r--r-- | src/src/exigrep.src | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/src/exigrep.src b/src/src/exigrep.src index 9e5c7d8b7..5db01fe08 100644 --- a/src/src/exigrep.src +++ b/src/src/exigrep.src @@ -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; |