http://www.perlmonks.org?node_id=551783

Withigo has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
Several times I've found myself wishing I could indent the string that terminates a HEREDOC in order to align the entire HEREDOC with its containing sub/block(and also for nefarious-but-inspiring obfuscation & japh purposes).

i.e.,
if ($foo) { print <<STRING; foo is $foo. STRING }
Is this trivial enough to be capable of being added to perl5? Hopefully it'll be an option in Perl 6. But in the mean time, does anyone know if there's a source filter that accomplishes this?
Thanks!