I need some way to check whether new data is available in the filehandle, without causing perl to wait until new data becomes available .... If anyone can think up a way around this, I'd really appreciate it!Actually, that's exactly what Tk's "readable" fileEvent bit is supposed to be doing for you - it shouldn't get triggered until there's something to read.
It sounds to me as though you're trying to do something very similar to Chapter 22 of O'Reilly's Mastering Perl/TK. (Where would copyright violation be without the Chinese?) I suggest that you look at that code and see what, if any, of it can be adapted/coerced to your purposes.
Incidentally, I was going to mention the IO::Select package and how to use that (or the four argument form of the select builtin) to determine whether a filehandle has anything waiting to be read. However, Tk should be doing that internally already, so I'm not sure that gets you anything. (Still, I suppose it's worth trying at least once - there's an example of using it over here)
In reply to Re: Forking Win32 ...
by fizbin
in thread Forking Win32 ...
by owenjm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |