We don't bite newbies here... much | |
PerlMonks |
Re: Filling a matrixby Athanasius (Archbishop) |
on Aug 08, 2014 at 12:20 UTC ( [id://1096750]=note: print w/replies, xml ) | Need Help?? |
Hello David92, The main problem is this line:
which simply overwrites the whole array on each iteration of the innermost loop. Replace it with this:
Also, please put
at the head of your script, and declare all variables explicitly as lexicals by using my:
— and note how much easier it is to read code which is indented consistently. ;-) Hope that helps,
In Section
Seekers of Perl Wisdom
|
|