Andrew Savige writes: > I stumbled across a couple of interesting quote interpolation > edge cases: > > Case 1 > ------ > > # cat ttt.p6 > my $x = "{"; > > # pugs ttt.p6 > > unexpected end of input > expecting "\"", "$!", "$/", "\\" or block > NonTerm SourcePos "ttt.p6" 2 1 > > Is this a bug?
No. Braces in strings are interpolator markers: say "The output of foo is { foo() }"; > Case 2 > ------ > > # cat q1.pl > my $x = "$"; > print "x='$x'\n"; > > # perl -w q1.pl > Final $ should be \$ or $name at q1.pl line 1, within string > syntax error at q1.pl line 1, near "= "$"" > Execution of q1.pl aborted due to compilation errors. > > # pugs q1.pl > x='$' Hmm, given that we require no whitespace between the $ and the identifier now, we might treat a $ not followed by \w or / as literal. Luke