http://qs1969.pair.com?node_id=649183

Tabari has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks

In an attempt at code clean up which was long overdue, I wanted to separate data form logic in my module and therefore tried to apply the <DATA> filehandle in the BEGIN section, putting the data neatly at the end of the file.
To no avail , however, although the same code worked well in a normal subroutine . I finally reverted to a here document instead.
This begs the folowing questions, in order of ascending vagueness :

1/ Is the DATA handle not initialized in BEGIN?
2/ Can I force such an initialization somehow, be it via another package?
3/ Is there a cleaner way for all this?

Tabari