thanks for all the suggestions, and yes the output should look like the output that anonymous monk posted above.
I can read the file into an array, but I wasn't sure how to
proceed through the array to average columns 6 and 7.
"infile=s" => \$infile,
open INFILE, "<$infile" or die $!;
#open RES, ">result.txt" or die $!;
@fields = split(/\t+/, $_);
my ($name, $chr, $location, $gen, $dom, $pval, $fst) = @fields