in reply to In-Place Edit - Null Characters


The solution is to binmode the filehandle so that any ^Z characters in the binary data don't act as end of file characters.

However, afaik, it isn't possible to binmode STDOUT while using -i like this on Window.

As such, I'd suggest opening the input file in read/write mode, binmode the filehandle, seek to the correct offset in the file and overwrite the IP address (using pack if necessary).

As an aside, the file header isn't actually gibberish. It looks like a OLE container document which you could extract data from using OLE::Storage_Lite if you so wished (but you almost certainly don't :-)).

--
John.

Replies are listed 'Best First'.
Re^2: In-Place Edit - Null Characters
by Anonymous Monk on Dec 23, 2005 at 02:23 UTC
    Hey John,

    In case no one has told you lately...You Da Man!!!
    It worked, thanks.