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 reply to Re^2: return file descriptor from function
by Laurent_R
in thread return file descriptor from function
by solomon243
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |