in reply to checking bareword-filehandle
Is there a good reason not to use a lexical variable as file handle?
open my $FH, '>', 'whatever' or warn 'blah'; # much much later if ($FH) { print $FH "something }
works for sure.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: checking bareword-filehandle
by morgon (Priest) on Aug 06, 2012 at 13:24 UTC | |
by moritz (Cardinal) on Aug 06, 2012 at 13:30 UTC |