Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: printing refence of hash inside a hash

by Samy_rio (Vicar)
on May 12, 2007 at 06:39 UTC ( #615050=note: print w/ replies, xml ) Need Help??


in reply to printing refence of hash inside a hash

Hi, try like this,

$data = { data => 'hello', complicated => { version => 1, + type => 'struct', }, req => 'Submit' }; foreach my $first (keys %$data ) { if (ref($data->{$first})) { foreach my $second (keys %{$data->{$first}}) { print " $second : ".$data->{$first}->{$second}."\n"; } } }

Regards,
Velusamy R.


eval"print uc\"\\c$_\""for split'','j)@,/6%@0%2,`e@3!-9v2)/@|6%,53!-9@2~j';


Comment on Re: printing refence of hash inside a hash
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (13)
As of 2015-07-07 14:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (89 votes), past polls