I'm using DATA because I would like to be able to edit the Perl file on disk, and have it reload the changes when I tell it to. | [reply] |
Replacing parts of your programs sounds really ugly and dangerous. I can easily envision problems with global my variable, for example. Seems to me a frest start using exec $^X, $0, @ARGV; would be a much better way of achieving that.
If you're determined to stay on your course, why now keep the reloadable code in a seperate file and just do that file instead of messing with DATA. Keep in mind that what you are doing with DATA is an undocumented side-effect of the implementation of DATA.
| [reply] [d/l] [select] |