You have a precedence/grouping problem:
andprint "Eval ret:",readonly((eval'capture(5)')->[0]);
both print "Str Eval ret :1"print "Eval ret:",readonly(eval('capture(5)')->[0]);
Update: Now that is odd that the grouping doesn't work for you,, mine's on Linux/Perl5.6.1.
Update 2 : Sure does look like a platform difference, and where one should not be. I can confirm that demerphq's initial results agree with what mine does with that code. It appears that it's only the parenthesized ones that differ.
Update 3 : One more test case:
prints "Str Eval ret :0" on mine. It looks like AS groups thataway. Curiouser and curiouser.print "Eval ret:",readonly(eval('capture(5)'->[0]));
After Compline,
Zaxo
In reply to Re: Eval str return different from Eval block return
by Zaxo
in thread Eval str return different from Eval block return
by demerphq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |