ignore interval option without input file
[barcat.git] / barcat
diff --git a/barcat b/barcat
index 9a5d3e8d56ae0e77fc28ba56353a07b49383b4e4..144b6244d0bd3970bdc1e36dbea987a330cb2566 100755 (executable)
--- a/barcat
+++ b/barcat
@@ -1,10 +1,9 @@
 #!/usr/bin/perl -CA
-use 5.018;
+use 5.014;
 use warnings;
 use utf8;
 use List::Util qw( min max sum );
 use open qw( :std :utf8 );
-use experimental qw( lexical_subs );
 
 our $VERSION = '1.06';
 
@@ -112,7 +111,8 @@ $opt{'value-length'} = 1 if $opt{unmodified};
 $opt{'signal-stat'} //= exists $SIG{INFO} ? 'INFO' : 'QUIT';
 $opt{markers} //= '=avg >31.73v <68.27v +50v |0';
 $opt{palette} //= $opt{color} && [31, 90, 32];
-$opt{input} = @ARGV && $ARGV[0] =~ m/\A[-0-9]/ ? \@ARGV : undef;
+$opt{input} = @ARGV && $ARGV[0] =~ m/\A[-0-9]/ ? \@ARGV : undef
+       and undef $opt{interval};
 
 my (@lines, @values, @order);
 
@@ -498,7 +498,7 @@ Monitor network latency from prefixed results:
 
 Commonly used after counting, for example users on the current server:
 
-    users | sed 's/ /\n/g' | sort | uniq -c | barcat
+    users | tr ' ' '\n' | sort | uniq -c | barcat
 
 Letter frequencies in text files: