Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: __DATA___ File Handle

by si_lence (Deacon)
on Aug 13, 2009 at 10:35 UTC ( #788201=note: print w/ replies, xml ) Need Help??


in reply to Re: __DATA___ File Handle
in thread __DATA___ File Handle

You do not need to open it, but - according to the documentation - you should close it yourself:

"The filehandle is left open pointing to the contents after __DATA__. It is the program's responsibility to close DATA when it is done reading from it." (Special Literals, as linked by Anonymous Monk).

cheers, si_lence


Comment on Re^2: __DATA___ File Handle
Re^3: __DATA___ File Handle
by ikegami (Pope) on Aug 13, 2009 at 13:31 UTC
    Which is to say that you can close the file handle to release the resources it uses, but Perl will do so automatically when the program exits if it's still open.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2014-04-18 17:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (471 votes), past polls