Monks, I was reading How do I tell if a handle is open for writing?. Although the thread didn't go down that way, but the guy sort of indicated that select can be used on normal files. I don't think so though. For example, the following code always prints -1 - nothing writable:
use strict; use warnings; use IO::Select; my $file; open $file, ">", "somefile"; my $sel = IO::Select->new(); $sel->add($file); my @writables= $sel->can_write(); print $#writables;
Can anyone demo the opposite?
In reply to Select and file handler by c_chipster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |