in reply to scalable chomping
Read the file line by line using $/ = '+'.
Apply regexps on each line to remove \n and replace record separators
This is onliner as example
where 'X', 'Y', 'Z' are characters to be replaced with record separator ';'perl -l -0x2B -pe 's/\n//g;s/[XYZ]/;/g' corruptedfile > recoveredfile
In Section Seekers of Perl Wisdom