Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 wandering the Monastery: (5)
As of 2014-09-22 04:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (178 votes), past polls