We don't bite newbies here... much | |
PerlMonks |
Re: how to get average of matrices' elements?by toolic (Bishop) |
on Nov 30, 2016 at 18:58 UTC ( [id://1176963]=note: print w/replies, xml ) | Need Help?? |
The first time through your nested for loops, @m_avrg is uninitialized. You can uninitialized with:
UPDATE: I copy'n'pasted the wrong code originally. Yes, Anon's x operator is better. See also: Basic debugging checklist Use 4 single spaces for each level of indentation.
In Section
Seekers of Perl Wisdom
|
|