The bug in the program below (beside the spotted $fh = open (...) instead of open ($fh,
If there are no errors, Perl will set all bits in $ebits to 0. However, a string where all bits are set to 0 is still true. So, hell will be raised even if there are no errors. And if file descriptors 4 and 5 would be in error, it would not raise the alarm.