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__