Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^2: Symbolic Reference in Method Call

by Eily (Curate)
on Jun 27, 2013 at 17:17 UTC ( #1041054=note: print w/ replies, xml ) Need Help??

in reply to Re: Symbolic Reference in Method Call
in thread Symbolic Reference in Method Call

I agree with kennethk, if you want to use symbolic references, there's a high probability that you are doing it wrong, or do not have a clear idea of what you are trying to do. But, if you know that you are asking for trouble, here is something that might help you :

our $value = "package var"; my $value = "lexical var"; my $ref = "value"; $, = ", "; print ${$ref}, $value, eval "\$$ref";
package var, lexical var, lexical var

You should see there that you can only access dynamix variables with symbolic references, not lexicals.

Comment on Re^2: Symbolic Reference in Method Call
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2015-11-25 18:46 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (685 votes), past polls