Jay Savage wrote:
On 7/29/07, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote:
The recommended usage of open is:
open my $omarfh, '<', 'junk' or die "Input file 'junk' cannot be opened: $!";
The three argument is preferred as a malicious user could enter a file name that
starts with '>'
It is preferred in code that accepts file names as user input and
doesn't perform taint checking. If the program uses a hard-coded
filenames, then no hurt, no foul. There can be no malicious user until
there is first a user.
There's no time like the present to learn good habits.
--
Just my 0.00000002 million dollars worth,
Shawn
"For the things we have to learn before we can do them, we learn by doing them."
Aristotle
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/