diff options
Diffstat (limited to 'pod/perltrap.pod')
-rw-r--r-- | pod/perltrap.pod | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pod/perltrap.pod b/pod/perltrap.pod index 7ba57d0c70..9382789969 100644 --- a/pod/perltrap.pod +++ b/pod/perltrap.pod @@ -438,6 +438,12 @@ whether this should be classed as a bug or not. # perl4 prints: x=10 # perl5 prints: Can't find string terminator "'" anywhere before EOF +You can avoid this problem, and remain compatible with perl4, if you +always explicitly include the package name: + + $x = 10 ; + print "x=${main'x}\n" ; + Also see precedence traps, for parsing C<$:>. =item * BugFix |