Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by arturo (Vicar)
on Mar 08, 2004 at 15:27 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (None)
    As of 2024-04-25 00:47 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found