What you want is quite unclear. What do you mean by "get a carriage return"? The code seems to issue a carriage
return, or a newline. Note also that <STDIN>
usually won't return a newline. Normally, a read in line will
be terminated by the line terminator. At end of file, this
might be different, but in that case, use eof.