http://www.perlmonks.org?node_id=1200135


in reply to Re^2: Inappropriate I/O control operation
in thread Inappropriate I/O control operation

$! is only meaningful after an error. Its value after a successful open is unspecified and could be anything.

Dave.