- or download this
unless (defined( $line = <> )) {
die $! if $!; # $! is only current and valid in the afterma
+th of a failure
last; # reached EOF
}
- or download this
$line = <>;
if ($!) {
print "Ohh noo, $!"; # an indefinite false-positive
}
- or download this
$ touch test; # create the dummy
...
$perl -Mstrict -Wle 'undef $!; open my $fh, "<", "test" or warn "warn
+: $!"; print "after : $!"
warn : No such file or directory at -e line 1.
after : No such file or directory