Syntactic Confectionery Delight | |
PerlMonks |
Re^2: return file descriptor from functionby Laurent_R (Canon) |
on Aug 10, 2013 at 22:48 UTC ( [id://1048956]=note: print w/replies, xml ) | Need Help?? |
Although the question was terse, I think that is what the OP most probably meant. And yes, using a lexical filehandle enables you to use it almost as any scalar variable: to pass it to a function, to return it from a function, to take a reference to it, to store it in an array of filehandles or in a hash, to make it a local persistent object in a closure, etc., even if you don't know or don't want to know anything on typeglobs.
In Section
Seekers of Perl Wisdom
|
|