Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


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

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.

Replies are listed 'Best First'.
Re^3: How to get a reference from an eval() string?
by mr_mischief (Monsignor) on Sep 06, 2016 at 15:03 UTC

    Beware the XY Problem. It's a common one in software fora.

      Confess that I might probably asking Y, but no regret. For resolving X, I believe TIMTOWTDI, and mostly for 1 time only. But Y is most likely a reusable skill in the long run (at least for me). Thanks for your echo though. =)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1171239]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-26 06:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found