develooper Front page | perl.perl5.porters | Postings from January 2012

Re: [perl #109146] 3-arg open of undef for read

From:
Yitzchak Scott-Thoennes
Date:
January 27, 2012 13:04
Subject:
Re: [perl #109146] 3-arg open of undef for read
Message ID:
CAN7g7HUkQ2vrxxmMNw08fm76aAc7VQ5ntEnbwuU+GZuvRv+zkQ@mail.gmail.com
On Fri, Jan 27, 2012 10:58:00 +0100, Ævar Arnfjörð Bjarmason wrote:
> What do we actually get on `open(FH, "<", undef)`? It seems to me
> that we create some skeleton filehandle that we can't actually do
> anything with.

It does open a temporary file, the same as the read-write modes would
have done.  The file is opened read/write, but I believe the perl handle
is marked as read only.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About