I know you said you don't want to open it first, but I don't know if there is any other way to do it.
What if you did something like this? (untested):
use IO::Select; open my $fh, "<", $fifo or die "couldn't open $fifo: $!"; my $sel = IO::Select->new($fh); if ($sel->can_read(0.1)) { close $fh; do_database_stuff(); }
In reply to Re: Watching a named pipe
by lostjimmy
in thread Watching a named pipe
by leighsharpe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |