The functionality surprised me here: $line =~ s/\r\n/\n/g if (defined $line); Do we need to do this? I have an application that needs to preserve CRLF as-is. If this is necessary, I'd like to add another function that doesn't strip off line endings. What should this function be called? -Allen