in reply to problem in for loop

open (INFILE_link,"<$fh") or die $!;

That would be better as:

open my $INFILE_link, '<', $fh or die "Could not open '$fh' because: $ +!";


while (my $line = <INFILE_link>) { chomp $line; my @line_array = split(/\s+/, $line); push (@file_array, \@line_array); }

That would be better as:

while ( <$INFILE_link> ) { push @file_array, [ split ]; }

Or maybe:

while ( my $line = <$INFILE_link> ) { push @file_array, [ split ' ', $line ]; }


my ($i, $a, $b, $c, $d, $x, $w, $y, $z, $ta, $tb, $tc, $td); $a= $b= $c= $d= $x= $w= $y= $z= $ta = $tb =$tc =$td= 0;

That might be better as:

my ( $i, $a, $b, $c, $d, $x, $w, $y, $z, $ta, $tb, $tc, $td ) = ( 0 + ) x 13;

Or maybe:

$_ = 0 for my ( $i, $a, $b, $c, $d, $x, $w, $y, $z, $ta, $tb, $tc, +$td );