in reply to Re^4: Excel and Perl
in thread Excel and Perl
foreach my $r (1 .. $s->{maxrow}) { my ($A, $B) = ($s->{cell}[5][$r] // 0, $s->{cell}[8][$r] // 0); $max{$A} //= $B; $max{$A} < $B and $max{$A} = $B; }
will take away all those warnings. I bet you don't want columns "A" and "B" then, now do you? You still have to select the correct columns! Let's take columns "C" and "T" with the alternative approach. Then you start reading the documentation.
foreach my $r (1 .. $s->{maxrow}) { my ($key, $value) = ($s->{"C$r"} // 0, $s->{"T$r"} // 0); $max{$key} //= $value; $max{$key} < $value and $max{$key} = $value; }
|
|---|