From 8ff50fe2488d1a2e19c134c4012f0ec1905af846 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 16 Jun 2024 09:59:39 -0300 Subject: bin/uri: Unbuffer when processing an stream online --- bin/uri | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/uri b/bin/uri index ca26326..bbe67ef 100755 --- a/bin/uri +++ b/bin/uri @@ -74,6 +74,8 @@ if ($opts{h}) { my $fn = $opts{d} ? \&URI::Escape::uri_unescape : \&URI::Escape::uri_escape; -for (@ARGV ? @ARGV : ) { - say &$fn($_); +$|++; + +while ($_ = (@ARGV ? @ARGV : )) { + print &$fn($_); } -- cgit v1.2.3