in reply to open my $fh, MODE, FILE vs. open my $fh, "MODE FILE"
open FH, MODE, FILE form is prefered, as long as you can guarentee the use of perl 5.6 or higher. That mode will make it a lot harder to accidentally open up a file the wrong mode (either due to a mis-typed filename or bad user input).
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: open my $fh, MODE, FILE vs. open my $fh, "MODE FILE"
by jweed (Chaplain) on Feb 03, 2004 at 00:53 UTC |