in reply to Why might a close operation die?
When you open a pipe to a command, the corresponding close will return false if the command exits with a non-zero exit status or if one of the system calls involved fails. When a close fails you should also examine $? to see if it contains information about the failure. The docs for close suggest this method:
close QSTAT or die $! ? "Error closing qstat: $!" : "Exit status $? from qstat";
| We're not surrounded, we're in a target-rich environment! |
|---|
|
|---|