for (my $i=0; $i<@CD_new_a_v_d_D; $i++) { if ($key eq $CD_new_a_v_d_D[$i]) { print "$key - $value\n"; } }