From: Mischa POSLAWSKY Date: Sat, 7 Sep 2019 18:49:39 +0000 (+0200) Subject: do not trim valueless contents X-Git-Tag: v1.04 X-Git-Url: http://git.shiar.nl/barcat.git/commitdiff_plain/86c2cfefde1a3c1329ddf1fa71b1ee3ad4a88f9f do not trim valueless contents --- 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;