http://www.perlmonks.org?node_id=1171238


in reply to How to get a reference from an eval() string?

Why don't you put the whole assignment to eval?
eval "$base\{$lastPart} = \$newData"

But you can return a reference to the value to be able to change it:

my $ref = eval "\\$base\{$lastPart}" || eval "$base = {}"; $$ref = $newData;

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,