Very well, I did not check whether Perl had trouble with any of those issues, but a lot of other languages do. I've seen people have such problems caused by text editors that are by no means full-fledged word processors (you wouldn't consider TextEdit.app or Wordpad as one, would you), but instead bordering on programmer's editors (Notepad++ or similar). I've helped debug a bug caused by the editor saving a BOM by default , and seen problems caused by each one of those things I mentioned.
(But when I introduce them to vim, they don't have any of those bugs. They don't exactly get much code written either, for some reason...)
 may have been php and its header() function