in reply to Detecting the close() of named pipes

Have you tried the -e file test?

Example:
open(my $z, '| more'); # stupid call, just an example! print ("Exists: ", -e $z, "\n"); close($z); print ("\nExists: ", -e $z, "\n");
Should return:
Exists: 1 Exists:

Replies are listed 'Best First'.
Re^2: Detecting the close() of named pipes
by jeffthewookiee (Sexton) on Aug 23, 2006 at 16:46 UTC
    When I close() the named pipe, it seems to leave the files there though... they still Exist. I'm using POSIX:mknod to make it.
      If you don't remove them, there they are. As usual ;-)

      Named pipes are files, you have to do the cleanup yourself, as opposed to anonymous pipes. The latter are reaped by the OS. See pipe for those.

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}