Keep It Simple, Stupid | |
PerlMonks |
Re: Lammentful logs fouled by failing filehandlingby JavaFan (Canon) |
on Apr 30, 2012 at 22:15 UTC ( [id://968166]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|