Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: can't use certain hashnames when traversing a slightly complex hash

by NetWallah (Abbot)
on Jan 06, 2013 at 18:54 UTC ( #1011904=note: print w/ replies, xml ) Need Help??


in reply to Re: can't use certain hashnames when traversing a slightly complex hash
in thread can't use certain hashnames when traversing a slightly complex hash

Inside the loop, try this

foreach my $g (@gists) { for my $filename( keys(%{$g->{files}}) ) { my $fref = $g->{files}{$filename}; # Simplify access to conten +ts ..( -> is optional betweeen "}{" ) print $fref->{raw_url}; last; # If you only want info for ONE file } }

             "By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest."           -Confucius


Comment on Re^2: can't use certain hashnames when traversing a slightly complex hash
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2015-07-28 05:55 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 (252 votes), past polls