while (defined(my $line = <$NA_Conn>)) { $input.=$line; } #processing the $input here...