$line =~ s/[ \t]*\r$//;