The low level approach would be select, which does exactly that, and on Unix systems also works on filehandles. On Win32, you would have to use WaitForMultipleObjects to get select-like functionality.
But most likely, you want a framework that calls your function(s) whenever something interesting happens, and POE is such a framework. Most likely POE::Wheel::File::Tail does what you want.
In reply to Re: Waiting for multiple filehandles
by Corion
in thread Waiting for multiple filehandles
by cog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |