If I have the following

my $self = "some text";
my $nself = ~eval(q/"self is $self"/,:lang<perl5>);

then surely $nself should be "self is some text".

But it is not. $self is not set inside the eval in pugs.

But
say ~eval(q/"self is $self"/);
yields
"self is some text"

Is this correct behaviour?

If yes, then how can I use content from a scalar inside an eval with perl5?

Reply via email to