my $flow_id = $data{partners}{$part_id}{flow}; my $flows_ref = $data{flows}{$flow_id}}; for my $wfref (@$flows_ref) { #... }