Juerd schreef:
> Dr.Ruud:
>> S05:
>>> s/pattern/{ eval doit() }/
>>
>> s/eval/try/ ?
>
> No, string eval stays eval. Only block eval is renamed to try.
Understood, but I was thinking about variants like
{ eval '' ~ doit() }
{ eval $\&doit }
and then wasn't sure anymore whether "eval doit()" is a string eval or
not.
$ perl5 -le 'sub x{print""; ""}; print(":". eval( "x()" ) .":")'
::
$ perl5 -le 'sub x{print""; ""}; print(":". eval {x()} .":")'
::
$ perl5 -le 'sub x{print""; ""}; print(":". eval( {x()} ) .":")'
::
$ perl5 -le 'sub x{print""; ""}; print(":". eval( x() ) .":")'
::
--
Groet, Ruud