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 reply to Re: scalable chomping
by ccn
in thread scalable chomping
by xorl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |