$data = ''; $data .= $buffer while sysread( $fh, $buffer, 1 ) and $buffer ne "\n";