useruser has asked for the wisdom of the Perl Monks concerning the following question:
This example behaves differently with and without the "use Fatal;" line. With this line, the output isuse strict; use warnings; use Fatal qw(:void open); open my $f, '<no_such_file' or die $!;
Died at temp.pl line 3.Without the line, the output is
No such file or directory at temp.pl line 3.So $! is cleared. Is that how it's supposed to work? I expected Fatal to have no effect in this case, since open is being used in scalar context, not void.
I'm running perl v5.6.1, ActiveState build 633. Thanks for your help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use Fatal ':void' vs. $!
by rblasch (Monk) on Jun 13, 2006 at 14:38 UTC | |
by Zaxo (Archbishop) on Jun 13, 2006 at 15:35 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |