in reply to Is it possible to modify __DATA__ via the DATA file handle or otherwise?
I strongly recommend that, if the data can be changed, it belongs in an external file ... not in the Perl source-code. In many shops, source-code is both version-controlled and write-protected, for very obvious reasons. Source-code is sacrosanct, and data which occurs within the source-code file is “part of the source-code.” If, instead, it is “really data,” IMHO it does not belong there. (To me, the __DATA__ construct serves the very-useful purpose that DATA statements served in the BASIC programs of yesteryear ... as a convenient place to store fixed data that was used for initialization or reference purposes.)