Note that 5.6 says *auto-vivification*, you could actually use scalar file
handles prior to this but you had to use Symbol::gensym (which is the proper
way to do the work-around given).
perl -MModule::CoreList -e 'print Module::CoreList->first_release('Symbol');'
prints 5.002
--
On 5/23/06, Uri Guttman <[EMAIL PROTECTED]> wrote:
> > "BT" == Ben Tilly <[EMAIL PROTECTED]> writes:
>
> BT> If you didn't remember the do local trick, you could always use Symbol
> BT> and then call gensym to get your typeglob.
>
> i have used Symbol::gensym for years and it is fine for
> "BT" == Ben Tilly <[EMAIL PROTECTED]> writes:
BT> If you didn't remember the do local trick, you could always use Symbol
BT> and then call gensym to get your typeglob.
i have used Symbol::gensym for years and it is fine for this. it comes
with perl5 from way back before 5.6 (not sure
3/2006 4:23 PM
> To: Greg London
> Cc: boston-pm@mail.pm.org
> Subject: RE: [Boston.pm] version of perl that can use scalar filehandles
>
>
>
> > more importantly, what is the syntax for passing a filehandle
> > into a routine if it is FILEHANDLE instead of $FILEHANDLE?
: RE: [Boston.pm] version of perl that can use scalar filehandles
> more importantly, what is the syntax for passing a filehandle
> into a routine if it is FILEHANDLE instead of $FILEHANDLE?
open(FILEHANDLE, ">>$filename" ) or die "trying $!";
> open(my
23/2006 4:10 PM
> To: boston-pm@mail.pm.org
> Subject: [Boston.pm] version of perl that can use scalar filehandles
>
>
>
> what was the earliest version of perl that would
> allow you to use scalar filehandles?
>
> open(my $fh, "filename");
>
> instead of
>
>more importantly, what is the syntax for passing a filehandle
>into a routine if it is FILEHANDLE instead of $FILEHANDLE?
foo(*FILEHANDLE)
___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm
>> On Tue, 23 May 2006 16:10:40 -0400, Greg London said:
> what was the earliest version of perl that would allow you to use
> scalar filehandles?
5.6; see perldoc perl56delta, "File and directory handles can be
autovivified".
> more importantly, what is the syntax for passing a
> more importantly, what is the syntax for passing a filehandle
> into a routine if it is FILEHANDLE instead of $FILEHANDLE?
open(FILEHANDLE, ">>$filename" ) or die "trying $!";
> open(my $fh, "filename");
Autovivification of unitialized scalar filehandles was added in 5.6.0
that can use scalar filehandles
what was the earliest version of perl that would
allow you to use scalar filehandles?
open(my $fh, "filename");
instead of
open(FILEHANDLE, "filename");
___
Boston-pm mailing list
Boston
what was the earliest version of perl that would
allow you to use scalar filehandles?
open(my $fh, "filename");
instead of
open(FILEHANDLE, "filename");
___
Boston-pm mailing list
Boston-pm@mail.pm.org
11 matches
Mail list logo