in reply to Re: Stream delimiting chars
in thread Stream delimiting chars

Yep. Variable length binary data. Looking at pack it seems uuencoding is the easiest. Shame it's not the most efficient.

Thanks.

____________________
Jeremy
I didn't believe in evil until I dated it.

Replies are listed 'Best First'.
(tye)Re: Stream delimiting chars
by tye (Sage) on Sep 13, 2001 at 21:10 UTC

    Just use "\n" as your end-of-record character (so you can use <SOCK>, even though it is often a bad idea) and do s/([\n\\])/\\$1/g before sending and s/\\./"n"eq$1?"\n":$1/ge; after you receive it.

            - tye (but my friends call me "Tye")