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


in reply to String differs from printing to STDOUT and printing to file

To combine the points that rjt and GrandFather made, it'd be best if you inspect your string with Devel::Peek and your file with hexdump; I gave an example here.