Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: variable through another variable

by Juerd (Abbot)
on Jan 26, 2002 at 17:01 UTC ( [id://141776]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $testing = "Hello, World!\n";
    $var = "testing";
    $data = $$var;
    print $data; # prints Hello, World!
    
  2. or download this
    $hash{"testing"} = "Hello, World!\n";
    $var = "testing";
    $data = $hash{$var};
    print $data;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-03-29 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found