eval with parameters
Peter
peter at aragos.ru
Sat May 20 00:54:27 BST 2006
Hello,
If I need to eval some code string that uses some calling function's
local variables as parameters what syntax should I use?
Case like this:
sub someFunction {
($param1,$param2,$codeString) = @_;
# $param1 & $param2 - some object or pseudohash variables
# $codeString - some external code string that uses $param1 & $param2 as
variables
# and returns some value
return eval($codeString); }
(I suspect that is stupid question, but I have never do something like
this and I did not find something like this in my manuals yet)
Peter
More information about the london.pm
mailing list