in reply to Re: DATA munging data
in thread DATA munging data
The tokens __END__ and __DATA__ may be used to indicate the logical end of the script before the actual end of file. Any following text is ignored, but may be read via a DATA filehandle: main::DATA for __END__, or PACKNAME::DATA (where PACKNAME is the current package) for __DATA__.
And an example:
produces: Hello, world!#!perl while (<DATA>) { print; } __END__ Hello, world!
|
|---|