in reply to Re: eval strings non reentrant?
in thread eval strings non reentrant?

guess this would work.. some small changes.. not too complex
$e = "my \$i=0; sub foo{ print \"\$i foo\\n\"; if (\$i < 10){ \$i++; print \"calling foo\\n\"; &foo; } } &foo\;"; eval "$e"; print $@

tc,
Garry

Replies are listed 'Best First'.
Re: Re: Re: eval strings non reentrant?
by gmpassos (Priest) on Jun 02, 2004 at 06:46 UTC
    Note that &foo will send the same arguments received by the function, since &foo is the same to write foo(@_), and is not the same of foo()!

    Graciliano M. P.
    "Creativity is the expression of the liberty".