I'm not sure at the moment if this works for pipes, but you could try checking the return value of fileno.
In reply to Re: Detect whether a writeable filehandle has closed?
by haukex
in thread Detect whether a writeable filehandle has closed?
by jdporter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |