|
|
| "be consistent" | |
| PerlMonks |
Re^3: odd behavior with DATA sectionby converter (Priest) |
| on Jul 26, 2005 at 00:28 UTC ( #478030=note: print w/ replies, xml ) | Need Help?? |
|
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.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||