Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 studying the Monastery: (13)
As of 2014-10-22 15:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (119 votes), past polls