the problem is that the reading and writing happen in separate threads, hence making "between calls" a very obscure concept in this context :-) situations might occur where reads and writes actually happen at the very same moment, in fact, it probably happens all the time the way the script is set up. It *seems* to be working fine though, but since all the docs advised against I thought I'd better go and ask if there's a more proper approach.
Comment on Re^2: filehandle/socket question (seek)
Where the first "..." depends on what you find appropriate. "undef" works for modern versions of Perl. Or you can use IO::Handle or other module or just do { local(*IN); \*IN }.