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

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

by NetWallah (Canon)
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?
[shmem]: hm. Can't resolve apod.nasa.gov - weird.
[shmem]: ns{1,2,3}.nasa.gov unreachable and no caching. -.-
[karlgoethebier]: funny that they call it Big Dipper in the US. Here this part of Ursa Major is called "Großer Wagen" Big wagon...or car as you like ;-)

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2017-11-21 18:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (308 votes). Check out past polls.

    Notices?