M
Marc Girod
Hello,
I am trying to eval metacode in a context, and cannot hide the
context.
-8<-------
#!/usr/bin/perl -w
use strict;
my $fubar = q(my $foo = 'bar'
;
print eval "$fubar\n";
while (<DATA>) {
print eval "${fubar}qq($_)";
}
print "End\n";
__DATA__
Hello ${foo}!
-8<-------
This gives me:
~> ./tmp/evtst
barHello bar!
End
The first 'bar' there is what annoys me... Go away!
But why is it there?
Yes: it is returned by the assignment to/initialization of $foo...
Why is it part of the return of 'eval'?
Thanks
Marc
I am trying to eval metacode in a context, and cannot hide the
context.
-8<-------
#!/usr/bin/perl -w
use strict;
my $fubar = q(my $foo = 'bar'
print eval "$fubar\n";
while (<DATA>) {
print eval "${fubar}qq($_)";
}
print "End\n";
__DATA__
Hello ${foo}!
-8<-------
This gives me:
~> ./tmp/evtst
barHello bar!
End
The first 'bar' there is what annoys me... Go away!
But why is it there?
Yes: it is returned by the assignment to/initialization of $foo...
Why is it part of the return of 'eval'?
Thanks
Marc