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; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Best way to keep script with generated output
by benizi (Hermit) on Dec 09, 2009 at 03:10 UTC | |
by ikegami (Patriarch) on Dec 09, 2009 at 17:48 UTC | |
by benizi (Hermit) on Dec 10, 2009 at 04:23 UTC | |
by ikegami (Patriarch) on Dec 10, 2009 at 07:06 UTC | |
by benizi (Hermit) on Dec 10, 2009 at 13:27 UTC | |
by ikegami (Patriarch) on Dec 10, 2009 at 07:07 UTC |
In Section
Seekers of Perl Wisdom