Re: open()
- From: tom@xxxxxxxxxxxxxx (Tom Phoenix)
- Date: Fri, 27 Oct 2006 10:20:23 -0700
On 10/27/06, Klaus Jantzen <kdjantzen@xxxxxxxxxxx> wrote:
Why should one separate the ">" etc. from the file name?
Mostly, if the file name might be user-supplied. Perl's open() treats
a number of characters as magical, potentially invoking a shell or
another program -- but that's dangerous power in untrusted hands. The
three-arg open() was invented to close that security hole. If you can
trust the filename string, there's nothing wrong with using Perl's
open() the "traditional" two-arg way.
Cheers!
--Tom Phoenix
Stonehenge Perl Training
.
- References:
- open()
- From: Klaus Jantzen
- open()
- Prev by Date: Re: open()
- Next by Date: Re: open()
- Previous by thread: Re: open()
- Next by thread: Re: open()
- Index(es):