http://www.perlmonks.org?node_id=950257


in reply to Re^7: split function
in thread split function

Your data file has some "hidden control characters" that mess up the line by line reading. The data lines that you present are not what the actual data is. Its just that simple.

Create this data file yourself by manually typing it in with vi or notepad or whatever plain text editor that you normally use and you will see that the code works. Don't use copy-and-paste as that would copy these "invisible" wrong characters.