in reply to TCL to Perl

From perldoc -f close:
If the file handle came from a piped open "close" will additionally return false if one of the other system calls involved fails or if the program exits with non-zero status. (If the only problem was that the program exited non-zero $! will be set to 0.)
See the perldoc for some example code and more explanation.

Makeshifts last the longest.