This is a program that computes data for manufacturing in company. I have to be sure that when data read from local file is broken in the middle of the process of reading, then the whole program fails. I will do that with "define" as you showed. If I read from a pipe (pipe open), then it fails on close if pipe is broken -- this is why I check exit status of close.