in reply to Eval str return different from Eval block return
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Eval str return different from Eval block return
by Dog and Pony (Priest) on May 17, 2002 at 09:49 UTC | |
|
Re: Re: Eval str return different from Eval block return
by demerphq (Chancellor) on May 17, 2002 at 09:47 UTC | |
by astaines (Curate) on May 17, 2002 at 11:53 UTC |