http://rt.perl.org/rt2/Ticket/Display.html?id=8702 This patch will make perltrap perfectly clear in this situation. Casey West -- "The wireless music box has no imaginable commercial value. Who would pay for a message sent to nobody in particular?" -- David Sarnoff's associates in response to his urgings for investment in the radio in the 1920s. --- perl-current.orig/pod/perltrap.pod Sun Apr 21 13:33:55 2002 +++ perl-current/pod/perltrap.pod Fri May 9 11:03:05 2003 @@ -1436,12 +1436,25 @@ =item * Interpolation -You also have to be careful about array references. +You also have to be careful about array and hash brackets during +interpolation. + + print "$foo[" + + perl 4 prints: [ + perl 5 prints: syntax error print "$foo{" perl 4 prints: { perl 5 prints: syntax error + +Perl 5 is expecting to find an index or key name following the respective +brackets, as well as an ending bracket of the appropriate type. In order +to mimic the behavior of Perl 4, you must escape the bracket like so. + + print "$foo\["; + print "$foo\{"; =item * InterpolationThread Next