good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: How to get a reference from an eval() string?by exilepanda (Friar) |
on Sep 06, 2016 at 10:15 UTC ( [id://1171239]=note: print w/replies, xml ) | Need Help?? |
Oh! Stupid me...
eval "$base\{$lastPart} = \$newData"
This works!! BIG THANKS!!
Seems my focus really draw to know how to get the reference deep in my heart.... rather than how to get this work done... But for the $$ref part, because I don't know what exactly the data type will be on the sub return side, either the assignment side, so that can be a %$ref, @$ref or $$ref etc. If I don't take care of it per case, I probably get sort of Not a XXXXX reference error.
In Section
Seekers of Perl Wisdom
|
|