G
Greg Snow
I have noticed several references to lexically scoped filehandles in
this group recently, code like:
{
open my $fh, "path/to/file" or die "couldn't open file: $!";
...
}
I want to read up some more on how this works, but have not found
anything in the standard docs about lexical filehandles. I greped all
the docs I have
(tcgrep.pl -p -r -i -l "(?s)lexical.{1,50}file\s*hand" in my perl
directory (activestate v5.6.1)) and that only pointed to perlopentut
and perlfaq5 which both only refer to using a non-lexical scalars as
the handle.
So, where are lexically scoped filehandles documented?
Thanks,
this group recently, code like:
{
open my $fh, "path/to/file" or die "couldn't open file: $!";
...
}
I want to read up some more on how this works, but have not found
anything in the standard docs about lexical filehandles. I greped all
the docs I have
(tcgrep.pl -p -r -i -l "(?s)lexical.{1,50}file\s*hand" in my perl
directory (activestate v5.6.1)) and that only pointed to perlopentut
and perlfaq5 which both only refer to using a non-lexical scalars as
the handle.
So, where are lexically scoped filehandles documented?
Thanks,