Aug 28, 2013, 2:22 PM
Post #1 of 4
I am using a library which searches through a complicated hash for a particular key/value pair, and what it returns is a string which is a "mapping" to where that key value pair is.
what can I do with an "accessor string" ?
So for example, I will get a string called, let's say, $result
The value of $result will be:
So it's a string that looks like "perl code" itself.
So now I have my hashref that I did the search on, let's call it, $myHash, and now I "know" exactly where my desired key/value pair is at. How do I use this accessor string to get it?
I mean - I realize I could parse this string, get the index numbers for the inner arrayrefs, hashrefs, etc., but I Just didn't know if perhaps perl had some functionality to use this string as the perl code itself. If I go, $myHash$result well this doesn't work. Just didn't know if it was in fact possible to do this, just obviously I'm doing it the wrong way