http://qs321.pair.com?node_id=11104584


in reply to Re^3: List comparison problem
in thread List comparison problem

Yes, you're absolutely right, they are not entirely equivalent. ++

But the aim of the OP code is really obviously to remove Windows CR characters from Windows line endings. And for that, that's OK.

Having said that, I completely agree that I have also seen quite a few times poorly-formed, non-compliant, randomly-encoded data originating from Windows.

I should also say that if my input was similar to your $have variable, I would probably have to think twice before I decided to remove CR characters within the string. It would really depend on that the final aim of the file comparison is.