in reply to unblessed reference problem

Have a look at Data::Diver, if you want to dive dynamically down a datastructure. Alternatively, you can look at eval, but using eval will open up security holes and you will have to make sure all your tests are well-formed Perl syntax and semantically valid (that is, $var1 and $var2 need to be defined.

Replies are listed 'Best First'.
Re^2: unblessed reference problem
by Anonymous Monk on Mar 26, 2010 at 11:13 UTC
Re^2: unblessed reference problem
by gdolph (Novice) on Mar 26, 2010 at 11:19 UTC

    I've tried using eval without success:

    my $answer = $hash->eval($test)

    I can "can't call method eval". I've never used eval before any hints?

      I linked to the documentation of eval for a reason. Nowhere in the documentation, your form of use is mentioned. That doesn't mean that your version does not work, but I wonder how you deduce that expectation from the documentation you read.

      *sigh* even more reason you shouldn't go near eval
        Gotta start sometime!