in reply to Re^4: Is a here-doc a good way to retrieve data file contents for testing? (updated)
in thread Is a here-doc a good way to retrieve data file contents for testing?
Why should that be unintended?
See perlop on Quote-like operators, where here-documents are equivalent to nomal double-quoted strings, and that certainly holds true for the scope where they are evaluated in. This scope is determined by the place where the <<"FOO" occurs, not where the end of string marker sits, since here-docs are a line-oriented quoting mechanism.
I'm pretty sure that this behaviour is intentional and has been a long time in Perl and will stay.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Is a here-doc a good way to retrieve data file contents for testing? (updated)
by haukex (Archbishop) on Jan 17, 2021 at 08:51 UTC | |
by haj (Vicar) on Jan 17, 2021 at 09:33 UTC |