in reply to Interesting SEEK behavior on tied filehandle
It turned out that even if you called read() with 3 arguments, READ was always called with 4 arguments, and the 4th (the offset) was set to zero (which I admit makes sense, but it threw a warning about uninitialized value in substr in this particular case, and made the conditional pointless).sub READ { if ( @_ == 3 ) { # read into buffer } else { # read into buffer at offset }
|
|---|