http://qs1969.pair.com?node_id=11154223


in reply to Re: Why is my code producing weird output?
in thread Why is my code producing weird output?

When you know that you have windows line separators, I prefer to handle them the same way that perl on windows does. Use the "IO Layer" crlf. Add the statement

binmode STDIN, ':crlf';

before your input loop.
Bill