while ($bytes_read) { my $buf; $bytes_read = sysread($out, $buf, $blocksize); ...