in reply to Re^3: do-ing of file without \n at the end
in thread do-ing of file without \n at the end

Bad file descriptor is error 0 on some systems. It means someone did $! = 0; under the false assumption that 0 meant success. Or as a favour for those who make that assumption.