Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: How to get a reference from an eval() string?

by exilepanda (Pilgrim)
on Sep 06, 2016 at 10:15 UTC ( #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
Node Status?
node history
Node Type: note [id://1171239]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2020-02-22 10:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (99 votes). Check out past polls.

    Notices?