Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: How to access hash of arrays values using perl

by veerubiji (Sexton)
on Dec 15, 2011 at 22:03 UTC ( #943842=note: print w/ replies, xml ) Need Help??


in reply to Re: How to access hash of arrays values using perl
in thread How to access hash of arrays values using perl

Sorry for not clearance post, I mean how to get nested elements, but I am facing difficult in getting "Type" and "Nr" values. can you help me with that, or give me some example.

Thanks for your reply


Comment on Re^2: How to access hash of arrays values using perl
Re^3: How to access hash of arrays values using perl
by TJPride (Pilgrim) on Dec 15, 2011 at 22:31 UTC
    Using my previous definition for $nested:

    for my $service (@{$nested->{'Service'}}) { for my $suppliers (@{$service->{'Suppliers'}}) { for my $hw (@{$suppliers->{'HW'}}) { print "Type: $hw->{'Type'}\n"; print "Nr: $hw->{'Nr'}\n"; } } }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2014-07-24 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls