I was reading the Perl docs on heredoc just now, and found one description that I found very confusing. I'm hoping you can help me understand what's being described here: http://perldoc.perl.org/perlop.html#Quote-Like-Operators
Specifically, this part:
If you use a here-doc within a delimited construct, such as in s///eg, the quoted material must come on the lines following the final delimiter. So instead of
you have to writes/this/<<E . 'that' the other E . 'more '/eg;s/this/<<E . 'that' . 'more '/eg; the other E
I understand the part about placing the heredoc after the s// construct, but the substitution itself is confusing. Does it mean the same as this?
I guess I'm wrong to assume those periods are concatenation operators, but if so, what's going on here? What's the use case?s/this/the other\nthatmore /eg;
Thanks very much in advance!
In reply to heredoc within a delimited construct by BeneSphinx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |