in reply to Re: Treating the file contents of a text file as a string
in thread Treating the file contents of a text file as a string

undef $/; #slurp entire file
That's a very bad idea. You must *NOT* modify special globals like that. Use localised versions and a minimal scope...