No reason to get excited. Here is how I would usually do it by iterating directly over the structure.
my $position = 1200; for my $s (@$data) { next unless $s->{PROT_NAME} eq 'ALK'; foreach my $p ( @{ $s->{PDBS} } ) { foreach my $b ( @{ $p->{BLOCKS} } ) { if ($position >= $b->{PSTART} && $position <= $b->{PEND} ) +{ print ($p->{PDB_ID},"\n"); } } } }
In reply to Re^3: json data: dereferencing arrays
by hdb
in thread json data: dereferencing arrays
by hulketa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |