in reply to relating arrays

You need to store the index that $best was found and use that to find the corresponding index from your other array. One way to do this is to use a hash as a lookup table:
my @numbers = ('0.001','0.34','0.456','0.521'); my @data = ('70.1','75.3','76.5','87.4'); my %data; @data{@data} = (0..$#data); my $best = $data{'76.5'}; print $numbers[$best], $/;

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)