Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Accessing/Printing Complex Data Structure

by jasonk (Parson)
on Apr 11, 2003 at 17:14 UTC ( #249932=note: print w/replies, xml ) Need Help??


in reply to Accessing/Printing Complex Data Structure

foreach my $img ( sort keys %images ) { my $kilobytes = 0; my $file_num = 0; print "key = $img\n"; my $count = 1; foreach ( @{$images{$img}->{frags}} ) { foreach(@{$_}) { $kilobytes += $_->{kilobytes}; $file_num += $_->{file_num}; print "frag".$count++." media ID = $_->{media_id}\n"; } } print "image kilobytes = $kilobytes "; print "image number_of_files = $file_num\n"; }

We're not surrounded, we're in a target-rich environment!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2023-01-28 16:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?