> BB> This doesn't work, unfortunately. There's more than one print
statement in
> BB> the original $generated code. Code like this is very possible:
> BB> $generatedCode = '$test = "some result"; $val1 = 10; print "test is:
> BB> $test,"; $val2=20; print ($val1 * $val2);';

> $generatedCode =~ s/print /\$result\.= /g;
> $generatedCode .= 'return $result';

I could solve it with this. The last line isn't strictly neccesary: with
eval the code is executed within the current code's context. So $result is
still around after the eval, if defined before that.

Thanks a lot.
Bas


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to