in reply to Win32/Linux portability

No, but a simple regex will do that:  $line=~s/\r//g;