Next | Tricks of the Wizards | 28 |
Similarly:
open my $fh, ...;
This now creates a new filehandle and stores it in $fh
What is actually created?
print "$fh\n"; GLOB(0x80f7b0c)
A glob reference
It's a glob that's not part of the symbol table
There are no aliasing effects on assignment
In Perl 6, open will simply return a filehandle object:
my $fh = open $filepath : mode=>'rw'
It will probably stringify as something like IO(0x436c1d)
Next | Copyright © 2003 M. J. Dominus |