$char = ''; until ($char eq "\n") { sysread($filehandle, $char, 1); $line .= $char; }