in reply to Pseudocode for table data

I am not sure what you mean by 'pseudocode'. I often start a small project such as this by writing a Perl program that is valid, but lacks important details. Here is a sample.
use strict; use warnings; sub mean {...} my @genes = ( #'GeneName E1 E2 E3 E4', 'ATA1 12 44 45 33', 'OSA2 100 79 85 83', 'DUA5 66 65 64 67', 'AXANT 4 4 6 2', ); foreach (@genes) { my ($name, @values) = split; print $name, mean(@values); }

It needs an implementation of the 'mean' function. It uses a hard coded array of strings rather than input. The output is unformatted. The default arguments of 'split' may not work as intended. Clearly, the highest priority is the function. I am not ashamed to use a module to do the heavy work.

use List::Util qw(sum); ... sub mean { return sum(@_)/@_ }

Now you should have a working program. Add input and output details until it meets your requirements. As a final step, you may want to replace the module with your own sum function.

Bill