Use scalar filehandles?  You're probably thinking of 5.6.0, which was
the first that would let you autovivify filehandles.  As far as I
know, through the 5.x series you could always do:

  my $fh = do {local *fh};
  open($fh, "< $somefile") or die "Can't read '$somefile': $!";

If you didn't remember the do local trick, you could always use Symbol
and then call gensym to get your typeglob.

As for passing old-style filehandles, both of the following syntaxes
are likely to work:

  call_function(*FILEHANDLE);
  call_function(\*FILEHANDLE);

Cheers,
Ben

On 5/23/06, Greg London <[EMAIL PROTECTED]> wrote:
> more importantly, what is the syntax for passing a filehandle
> into a routine if it is FILEHANDLE instead of $FILEHANDLE?
>
>
> ________________________________
>
> From: [EMAIL PROTECTED] on behalf of Greg London
> Sent: Tue 5/23/2006 4:10 PM
> To: [email protected]
> 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
>
> open(FILEHANDLE, "filename");
>
>
> _______________________________________________
> Boston-pm mailing list
> [email protected]
> http://mail.pm.org/mailman/listinfo/boston-pm
>
>
>
> _______________________________________________
> Boston-pm mailing list
> [email protected]
> http://mail.pm.org/mailman/listinfo/boston-pm
>
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to