From: Mischa POSLAWSKY Date: Sat, 7 Sep 2019 14:54:18 +0000 (+0200) Subject: omit source code position in regex error message X-Git-Tag: v1.04~10 X-Git-Url: http://git.shiar.nl/barcat.git/commitdiff_plain/9e1e2b150d99770d3b6dbe83e458c80a371ebcff?hp=9311bd5ea1a9b062c2a1f88fe768829ffc3c004b omit source code position in regex error message --- diff --git a/barcat b/barcat index 6d56109..b75bf98 100755 --- a/barcat +++ b/barcat @@ -21,7 +21,7 @@ GetOptions(\%opt, eval { local $_ = $_[1]; $opt{anchor} = /^[0-9]+$/ ? qr/(?:\S*\h+){$_}\K/ : qr/$_/; - } or die "$@ for option $_[0]\n"; + } or die $@ =~ s/(?: at .+)?$/ for option $_[0]/r; }, 'human-readable|H!', 'interval|t:i',