"Konovalov, Vadim" <vkonovalov@lucent.com> wrote > While ramblering in Perl's regexp source I've noticed that (?{...}) > construction is parsed in regcomp.c in too simplified way. > perl -e '/(?{print "Hello{"})/' > explains: > Sequence (?{...}) not terminated or not {}-balanced at -e line 1, within pattern > /(?{print "Hello{"})/: Sequence (?{...}) not terminated or not {}-balanced at -e line 1. It's interesting that in other analogous cases, Perl gets this right. For example perl -we '@{"{"} = (1..3);print qq(@{"{"}\n)' prints 1 2 3 So I'd call this a bug. But you can circumvent it with an escape: perl -e '/(?{print "Hello\{"})/' Hello{ Mike GuyThread Previous | Thread Next