in reply to While loop stops after reading new line?

Maybe you want:
$_ = <FILE>;