my @max; for (my $n = 0; $n < @lines; $n++) { # Assume the rows are in @lines $values[$n] = [split /;/, $lines[$n]]; shift @values; for (my $i = 0; $i < @{$values[0]}; $i++) { if ($values[$i] >= $lines[$max[$i]||0][$i]) { $max[$i] = $n; } } } print "$_\n" for @max;
In reply to Re: Find column number for the row-wise max value
by JavaFan
in thread Find column number for the row-wise max value
by jaksow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |