Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Re: Re: Runtime Hash Variable access

by arturo (Vicar)
on Mar 08, 2004 at 15:27 UTC ( #334835=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    my $bar = "foo";
    
    print $$bar;
    
  2. or download this
    my %vars = ( the_var_i_want => 'this is the actual value' );
    chomp (my $the_name = <STDIN>);
    print $var{"${the_name}_i_want"};
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2023-05-29 03:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?