in reply to Perl 5.8.8 bug?
Of course, the problem can be "solved" by inserting a false "}" inside a comment:
A simpler solution would have been to escape the delimiter like you would do with single-line string literals.
#sub _DBLoad \{
However, single-quoted here-docs are even simpler. They remove the need to escape slashes and delimiters.
eval <<'__EOI__'; ... __EOI__
For example, the output of the following two snippets differ only in the leading newline.
print q{ foo \{ \} \\\\ bar };
print <<'__EOI__'; foo { } \\ bar __EOI__
Update: Added escaping solution.
|
|---|