in reply to Re^3: Unable to match newline
in thread Unable to match newline

Thank you! Thank you! Thank you! Thank you!

So all I needed was "perl -n0e"

I plan to convert this mix of shell and perl program into a full perl version but that will be another day as I have to learn quite a few more things about perl :)