Re: Perl 5.8.6 bug in open()?
- From: mritty@xxxxxxxxx (Paul Lalli)
- Date: Tue, 30 Oct 2007 10:15:16 -0700
On Oct 30, 11:09 am, p...@xxxxxxxx (Paul Johnson) wrote:
On Tue, Oct 30, 2007 at 07:42:02AM -0700, Paul Lalli wrote:
It's known, but I don't know that it qualifies as a bug. When you
use the two argument form of open, Perl is looking for both the
filename and mode, concatenated together, possibly with spaces
separating them. Since your file ends in a space, you can't use this
shortcut. In reality, you should NEVER use this short cut.
That's an awfully long time.
The functionality is there for a reason, and sometimes it's appropriate
to use it. Admittedly, that's not very often, but it's more often than
never.
It's there to make modern Perl compatable with old Perls. The only
justifiable reason I can think of to use it is to allow your user to
specify a pipe instead of a file name when you ask for a file. And if
that's something you want to do, I'd suggest you're programming a
pretty massive security hole.
Paul Lalli
.
- Follow-Ups:
- Re: Perl 5.8.6 bug in open()?
- From: Tom Phoenix
- Re: Perl 5.8.6 bug in open()?
- References:
- Perl 5.8.6 bug in open()?
- From: google
- Re: Perl 5.8.6 bug in open()?
- From: Paul Lalli
- Re: Perl 5.8.6 bug in open()?
- From: Paul Johnson
- Perl 5.8.6 bug in open()?
- Prev by Date: Re: One sprintf() initializations problem
- Next by Date: Re: Syntax Checker Script
- Previous by thread: Re: Perl 5.8.6 bug in open()?
- Next by thread: Re: Perl 5.8.6 bug in open()?
- Index(es):
Relevant Pages
|