in reply to Re^2: $foo = << "END"
in thread $foo = << "END"
Except that your example is not the same. Yours has a leading space that mine doesn't have, and mine has a trailing newline that yours doesn't. Those are things that can be more easily spotted with a heredoc.
On the other hand, some things can be tricky to do with a heredoc, like ending a multi-line string without a newline. So each method has its own best uses.
Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.
|
|---|