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


in reply to Re^2: Best way to keep script with generated output
in thread Best way to keep script with generated output

Can you include a literal newline inside the double quotes? That would allow you to use perl -x:
<not> <gonna> <happen> : " #!perl . . This is the script . __END__ " . . This is the actual file .

So what would the script look like? How about

local $^I = '~'; local @ARGV = __FILE__; my $seen_data; while (<>) { if (!$seen_data) { $seen_data = $_ eq qq{__END__\n}; next; } ... change $_ as desired ... } continue { print; }