in reply to Scope of the DATA handle
A good way to do what you want has already been suggested.
No, Perl stops reading when it sees __END__ or __DATA__ and so anything you put after that is completely ignored by Perl. It certainly doesn't expect to find Perl code after those lines and so won't parse "package" nor "__DATA__" nor any other Perl keywords below that, otherwise people would be getting syntax errors when they had placed data that isn't Perl code there.
- tye (but my friends call me "Tye")
|
|---|