in reply to Filehandles when Open Fails
The documentation says:
If FILEHANDLE is an undefined scalar variable (or array or hash element) the variable is assigned a reference to a new anonymous filehandleSo this means that when you say open my $fh, ..., it is essentially the same as this:
my $fh = \*ANON; open( $fh, "...");
Since the anonymous filehandle is really created before the open, it will still exist even if the open fails...
| We're not surrounded, we're in a target-rich environment! |
|---|
|
|---|