Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 studying the Monastery: (7)
As of 2014-12-25 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (161 votes), past polls