foreach my $key2 (@aminos) { printf OUT ("$forprint ", $A->{$key}->{$key2} // ''); }