in reply to Lammentful logs fouled by failing filehandling

It logs it correctly (as I expect it to), but it also sets $! to 'Inappropriate I/O control operation.'
Yeah, and?

$! is defined to contain only a meaningful value right after a failed system call (it links to errno, which has the same behaviour). Any system call is free to do whatever it wants with errno/$! if the call succeeds.

Since your code succeeds, the value of $! is meaningless.