Try this:
perl -ne 'print unless /\x1a/;' concatfile >x.txt

Update: This only works if the \x1a is on a line by itself. If not, try this:

perl -npe 's/\x1a//;' concatfile >x.txt
This is however virtually the same thing as yours. It works for me on a file with random \x1a scattered throughout it (as does your code if I drop the binmode. If you're on Unix, you don't need it, and you would need to put it after the open of concatfile for it to work as well).


In reply to Re: File end marker problem by robartes
in thread File end marker problem by DaveKelly

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":