prior of perl 5.26 you can use some trick to indent heredocs: substitution
That only works for variable assignment. If the same trick is attempted with a print statement, Perl complains that we Can't modify print in substitution (s///).
print <<"HEREDOC" =~ s/^\s+//gm; # <- Doesn't work your text goes here HEREDOC
I guess it could just be followed by print $var; but that continues the theme of inelegant solutions. I am sure there is a 'nice' solution to this...
In reply to Re^2: Here documents in blocks
by Bod
in thread Here documents in blocks
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |