Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: perl hash array printing

by choroba (Abbot)
on Sep 04, 2012 at 23:50 UTC ( #991707=note: print w/ replies, xml ) Need Help??


in reply to perl hash array printing

If I understand correctly, you are after

my $second = $totalhash{hello}{world}[1];
See Perl Data Structures Cookbook for details.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: perl hash array printing
Download Code
Re^2: perl hash array printing
by Anonymous Monk on Sep 05, 2012 at 00:03 UTC

    yes i believe so only made for array like with @(), I am going to try this out:)

      $ perl -e " use Data::Dump; $totalhash{hello}{world}[1]=9; dd \%total +hash; dd $totalhash{hello}{world}[1]; " { hello => { world => [undef, 9] } } 9

      See References quick reference

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2014-12-21 18:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls