Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^4: Memory issue with large cancer gene data structure

by ZWcarp (Beadle)
on Aug 08, 2013 at 15:30 UTC ( #1048590=note: print w/replies, xml ) Need Help??

in reply to Re^3: Memory issue with large cancer gene data structure
in thread Memory issue with large cancer gene data structure

Thanks again for your help. Would you mind explaining how this section is working?
# now remove double counted patients from the data structure foreach my $gene ( values %site_length_catch) { for my $count ( values %$gene ) { $count = keys %$count; # in scalar context you get the + number of keys

I get that you've created a hash of a hash of a hash $site_length_catch{$gene}{$sit}{$patient} = 1; and initialized the bottom value array to 1 ...correct? but then with this part how are you accessing the values of the next level... why would you use  values %site_length_catch instead of keys %site_length_catch

Thanks again for your time, the code works great, I just want to fully understand whats happening.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1048590]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2017-02-27 15:28 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (388 votes). Check out past polls.