Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: odd behavior with DATA section

by converter (Priest)
on Jul 26, 2005 at 00:28 UTC ( #478030=note: print w/ replies, xml ) Need Help??


in reply to Re^2: odd behavior with DATA section
in thread odd behavior with DATA section

The DATA filehandle is always used to access the text after the token, no matter if it is the __END__ or the __DATA__ token. The perldata man page gives a few important details that you should be aware of.

I had always believed that __END__ should be used in the top-level script, with __DATA__ used only in code compiled via require or do. After re-reading the perldata man page I am of the opinion that the __DATA__ token is similar to the __END__ token but with extra features and that its use in the top-level script is fine.

Someone please correct me if I'm wrong.


Comment on Re^3: odd behavior with DATA section

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2014-08-20 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (105 votes), past polls