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:
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.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.
Give a man a fish: <%-{-{-{-<
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Should I worry about "Inappropriate ioctl for device"? (updated)
by Lady_Aleena (Curate) on Aug 09, 2020 at 02:11 UTC | |
by jcb (Parson) on Aug 09, 2020 at 02:29 UTC | |
by dave_the_m (Monsignor) on Aug 09, 2020 at 08:28 UTC | |
by dave_the_m (Monsignor) on Aug 09, 2020 at 08:35 UTC | |
by AnomalousMonk (Bishop) on Aug 09, 2020 at 08:29 UTC | |
by Lady_Aleena (Curate) on Aug 09, 2020 at 18:18 UTC | |
by AnomalousMonk (Bishop) on Aug 09, 2020 at 19:01 UTC |
In Section
Seekers of Perl Wisdom