in reply to Re^4: Is it possible to modify __DATA__ via the DATA file handle or otherwise?
in thread Is it possible to modify __DATA__ via the DATA file handle or otherwise?

Still using the tell of the DATA filehandle is the far better approach.

You are correct, and thank you for the inspiration :-) I just released v0.08 of File::Replace with a new copy method:

use warnings; use strict; use File::Replace 0.08 'replace3'; my ($infh,$outfh,$repl) = replace3(__FILE__,':raw'); $repl->copy(tell(DATA)); print $outfh "New stuff! ".gmtime." UTC\n"; $repl->finish; __DATA__