From 86c2cfefde1a3c1329ddf1fa71b1ee3ad4a88f9f Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 7 Sep 2019 20:49:39 +0200 Subject: [PATCH] do not trim valueless contents --- barcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/barcat b/barcat index 600f453..1347cf5 100755 --- a/barcat +++ b/barcat @@ -85,7 +85,7 @@ while (readline) { s/^\h*// unless $opt{unmodified}; push @values, s/$valmatch/\n/ && $1; push @order, $1 if length $1; - if (defined $opt{trim}) { + if (defined $opt{trim} and defined $1) { my $trimpos = abs $opt{trim}; if ($trimpos <= 1) { $_ = substr $_, 0, 1; -- 2.30.0