sub io_cb { my $fh = shift; local $/ = "\r"; my $line = <$fh>; # blocks until there is a \r # update progress bar with $line }