in reply to Creating an array of hash references
Does the client receive a sequence of distinct hashes in a single stream? If so, how do you know the boundaries between hashes?
But the main question is: how do you know when you are finished reading? I would tend to use a "read()" call in this situation, or maybe sysread, and maybe play with ioctl's or fcntl's in order to do non-blocking reads from the server. Put all the input data into a scalar in the client, and after the reading is done (and there's time to process it), use unpack or split or whatever to break the stream up into the hash(es).
|
|---|