in reply to Reading in a file not recognizing lines
The '\r' is discussed already in Why chomp() is not considering carriage-return