-#! PERL_COMMAND -w
+#! PERL_COMMAND
+use warnings;
use strict;
+BEGIN { pop @INC if $INC[-1] eq '.' };
-# Copyright (c) 2007-2014 University of Cambridge.
+# Copyright (c) 2007-2015 University of Cambridge.
# See the file NOTICE for conditions of use and distribution.
# Except when they appear in comments, the following placeholders in this
{
if ($filename =~ /\.(?:$ext)$/)
{
- # Just die if compressor not found; if this occurrs in the middle of
+ # Just die if compressor not found; if this occurs in the middle of
# two valid files with a lot of matches, error could easily be missed.
die("Didn't find $ext decompressor for $filename\n")
if ($compressors->{$ext}->{bin} eq '');
foreach (@ARGV)
{
my $filename = $_;
- if ($filename =~ /\.(?:COMPRESS_SUFFIX)$/o)
+ if (-x 'ZCAT_COMMAND' && $filename =~ /\.(?:COMPRESS_SUFFIX)$/o)
{
open(LOG, "ZCAT_COMMAND $filename |") ||
die "Unable to zcat $filename: $!\n";