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


in reply to newline substitution is removing text too

There are probably also carriage returns in the file as well. tr/\r//d or s/\r//g will remove them.

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart