Mr. Shawn H. Corey wrote:
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.

When someone is trying very hard to learn to write Perl that works at
all, I think it is /not/ the time to regale him with the rigours of
professional programming.

Rob

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to