Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

This is a useless node

by shagbark (Acolyte)
on Apr 24, 2018 at 20:37 UTC ( #1213506=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict; use warnings;
    my %h=(a=>1,b=>2,c=>3);
    ...
    my $gr = \%g;
    print $gr->{a}       # prints "1"
    print $gr->{b}       # prints "Use of uninitialized value in print"
    
  2. or download this
    my %h=(a=>1,b=>2,c=>3);
    my @x=('a','c');
    my $hr = \%h;
    my $gr = $hr->{@x};
    print $gr->{a}
    
  3. or download this
    my $gr = $hr{@x};
    my $gr = $$hr->{@x};
    my $gr = \%{$hr}{@x}
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2020-01-26 08:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?