git.shiar.nl
/
barcat.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
annotate intentional lvalue substr
[barcat.git]
/
barcat
diff --git
a/barcat
b/barcat
index b0237c4eb249f923940f1c56df1376dfbd14a182..879624860a84d679ba05b82a65492d4c5795a576 100755
(executable)
--- a/
barcat
+++ b/
barcat
@@
-162,6
+162,7
@@
while (defined ($_ = $opt{input} ? shift @{ $opt{input} } : readline)) {
$_ = substr $_, 0, 2;
}
elsif (length > $trimpos) {
+ # cut and replace (intentional lvalue for speed, contrary to PBP)
substr($_, $trimpos - 1) = '…';
}
}