while () { s/\r?\n$//; # If there is no \r, so what? # Random code }