in reply to open won't die

Here is a pointer to the best example I could find that throughly checks the success of the open(), close(), and the 'piped' program. It's a bit cumbersome. To my surprise it was documented on the close page. I haven't been there for a while.

YuckFoo

open(OUTPUT, '|sort >foo') # pipe to sort or die "Can't start sort: $!"; #... close OUTPUT # wait for sort to finish or warn $! ? "Error closing sort pipe: $!" : "Exit status $? from sort";