in reply to Re: striping nulls
in thread striping nulls

I am using strict

s/\x00+//g;

simply erases everything, however

tr/\x00//d;

works perfectly. Thanks

Replies are listed 'Best First'.
Re^3: striping nulls
by ww (Archbishop) on Oct 01, 2010 at 03:07 UTC
    If graff's suggestion of s/\x00+//g; "erases everything" in a file that appears to contain both text and nulls, I suspect you don't have what ( it looks like | you said | you think ) you have in the initial data.

    Rather than looking at the data with an editor, check it with an ap designed to read hex... or write one of your own -- a task to which Perl is well suited.

Re^3: striping nulls
by ikegami (Patriarch) on Oct 01, 2010 at 03:37 UTC
    They both do the same thing.