in reply to Reading command output buffer

Are you certain there's at least 4096 bytes in the SQL dump? The read would return an undef if that's not the case. Then the while block wouldn't get executed.

Revised: As per Fletch I had it wrong.

I'd still test the error return, though...

Replies are listed 'Best First'.
Re^2: Reading command output buffer
by Fletch (Bishop) on May 09, 2008 at 19:57 UTC

    Erm, no. read will try to read up to 4096 and will return the number actually read (0 on eof, or undef if there's an error like trying to read when there's no data on a non-blocking handle).

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.