See the documentation for eval. Just be aware that this does compilation at run-time, so if you're doing a lot of these, your performance will suffer. Unless you need to be re-interpreting the string contained in $function to come up with different Perl code for each try, you should try to think of a way to do this without using eval.my $return_value = eval $function;
In reply to Re: Eval tomfoolery...
by Fastolfe
in thread Eval tomfoolery...
by ismail
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |