Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

How to access a static hash.

by gam3 (Curate)
on Mar 17, 2007 at 17:54 UTC ( [id://605287]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $hash = { a => 'b' };
    $hash->{$x}
    
  2. or download this
    {a => 'b'}->{$x}
    
  3. or download this
    our $hash = { 'a' => 'A', 'b' => 'B'};
    
    ...
        'hash' => sub { for my $x (qw(a b a b a b)) { my $y = { 'a' => 'A'
    +, 'b' => 'B'}->{$x}; }},
        'ref' => sub { for my $x (qw(a b a b a b)) { my $y = $hash->{$x}; 
    +}},
    });
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-04-24 03:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found