Thanks, but that doesn't make it easy (of course) to create a Filter to read
the complete string. The closest I can get is to define an end of message
indicator (for my app) and look for that.
Since I test the app with telnet I don't want to be too fancy (i.e. embed
the length as the first X characters, etc).
> -----Original Message-----
> From: "Dennis Taylor" <[EMAIL PROTECTED]>@INTERNET@HHC
> Sent: Monday, October 01, 2001 12:56 PM
> To: Bob Maccione
> Cc: [EMAIL PROTECTED]
> Subject: Re: FW: Message sizes
>
> <<...>>
> On Mon, Oct 01, 2001 at 02:36:02PM -0500, Bob Maccione wrote:
>
> > Hmm, since I'm using Filter::Stream I guess my next question is how to
> you
> > tell the end of a string (for lack of a better word) in Perl? I guess I
> > could write a Filter::String and then assume that all strings end with a
> > null and look for the null in the stream, however I'm not sure if this
> is
> > really correct (and I did search the web) and have no idea on how Perl
> knows
> > the end of a string.
>
> Perl's strings are stored in a simple structure, which looks
> sort of like this:
>
> struct {
> pointer to a buffer containing the string data
> integer, length of the string in bytes
> integer, reference counter
> };
>
> So it really doesn't have anything to do with the C method of
> inserting a trailing character at the end of the string; a side effect
> of this is that Perl's strings have no problem storing NUL characters.
>
> _________________________________________________________________________
> Dennis Taylor "Anyone whose days are all the same and free from
> [EMAIL PROTECTED] want inhabits eternity of a sort." - Peter Hoeg
> _________________________________________________________________________
> PGP Fingerprint: E8D6 9670 4FBD EEC3 6C6B 810B 2B30 E529 51BD 7B90
>