This is copied from Perl. See <a href="http://stackoverflow.com/questions/161872/hidden-features-of-perl#163700" rel="nofollow">http://stackoverflow.com/questions/161872/hidden-features-of...</a><p><pre><code> my @lines = <DATA>;
for (@lines) {
print if /bad/;
}
__DATA__
some good data
some bad data
more good data
more good data</code></pre>
I wrote a static-site generator, and I wanted to be able to allow users to deploy new instances easily.<p>To do that I wrote some code that parses a __DATA__ block for lines like:<p>mkdir foo
create_file foo/bar.txt <<EOF
..
This is the file content
..
EOF
mkdir bar
..<p>The process was very simple and allowed me to bundle up the "master template" files in one simple to understand resource.<p>[1] - <a href="https://github.com/skx/templer" rel="nofollow">https://github.com/skx/templer</a>
[2] - <a href="https://raw.github.com/skx/templer/master/lib/Templer/Site/New.pm" rel="nofollow">https://raw.github.com/skx/templer/master/lib/Templer/Site/N...</a>