Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: return file descriptor from function

by Laurent_R (Abbot)
on Aug 10, 2013 at 22:48 UTC ( #1048956=note: print w/replies, xml ) Need Help??


in reply to Re: return file descriptor from function
in thread return file descriptor from function

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.

  • Comment on Re^2: return file descriptor from function

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1048956]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2016-10-01 07:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (575 votes). Check out past polls.