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


in reply to Re: Should I worry about "Inappropriate ioctl for device"?
in thread Should I worry about "Inappropriate ioctl for device"?

Nothing in the code you show does anything that would give $! a meaningful value. The value $! actually has at the moment the code shown is executed was either set in some previous operation that gave $! a meaningful value (update: see this), or else it's the value $! happened to have at program startup (update: see this), i.e., random. Either way, its value is meaningless.

Update: Consider this code:

c:\@Work\Perl\monks>perl -wMstrict -le "my $year = 987; $! = 0; if ($year !~ /\d{4}/) { die qq{Idiot!, use 4 digit year. Stopped '$!' +} } " Idiot!, use 4 digit year. Stopped '' at -e line 1.
Now try assigning different values (1, 2, 3, ...) to $! and see what messages you get. The messages you're seeing in your posted code are just cruft.


Give a man a fish:  <%-{-{-{-<