Thank you! You guys are really amazing. I think your approach is basically the same as what sundialsvc4 was suggesting. I'm still struggling to grasp how Perl objects work. JavaFan wrote "A Perl object is a reference that's blessed into a package", and if I understand your code right, the reference in this case is to the hash that contains the parameters ("bless \%params, $class"). I agree that what I'm trying to do is trivial, but I am none the wiser about why none of the other versions suggested worked, except that the evaluation of the passed variable name was problematic.
In reply to Re^2: trouble with evaluate
by genghis
in thread trouble with evaluate
by genghis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |