note
toolic
The first time through your nested for loops, @m_avrg is uninitialized. You can uninitialized with:
<c>
my @m_avrg;
for my $i ( 0 .. 2 ) {
$m_avrg[$i] = [ map { $_ = 0 } 1 .. 3 ];
# $m_avrg[$i] = [ map { $_ => 0 } 1 .. 3 ]; # WRONG!
}
</c>
<p>UPDATE: I copy'n'pasted the wrong code originally. Yes, Anon's x operator is better.
<p>See also: [Basic debugging checklist]
<p>Use 4 single spaces for each level of indentation.
1176960
1176960