for my $i (0 .. $#data) {
for my $j (0 .. $#data) {
next if $i == $j;
my @coords_i = @{$data[$i]}[1,2,3];
my @coords_j = @{$data[$j]}[1,2,3];
print OUT "%s to %s Distance-%.5f\n", ####( ; )??
$data[$i][1], $data[$j][1],
$data[$i][11], $data[$j][11],
distance(\@coords_i, \@coords_j);
}
}
####
C:\Users\Fred\Desktop\pm>perl dis1.pl
Argument "CA" isn't numeric in subtraction (-) at dis1.pl line 38, line 4 (
#1)
(W numeric) The indicated string was fed as an argument to an operator
that expected a numeric value instead. If you're fortunate the message
will identify which operator was so unfortunate.
Argument "N" isn't numeric in subtraction (-) at dis1.pl line 38, line 4 (#
1)
Argument "MSE" isn't numeric in subtraction (-) at dis1.pl line 38, line 4
(#1)
Argument "C" isn't numeric in subtraction (-) at dis1.pl line 38, line 4 (#
1)
Argument "O" isn't numeric in subtraction (-) at dis1.pl line 38, line 4 (#
1)
Done.
####
%s to %s Distance-%.5f
12NC1%s to %s Distance-%.5f
13NC2%s to %s Distance-%.5f
14NO3%s to %s Distance-%.5f
21CN1%s to %s Distance-%.5f
23CC1%s to %s Distance-%.5f
24CO2%s to %s Distance-%.5f
31CN2%s to %s Distance-%.5f
32CC1%s to %s Distance-%.5f
34CO1%s to %s Distance-%.5f
41ON3%s to %s Distance-%.5f
42OC2%s to %s Distance-%.5f
43OC1