http://www.perlmonks.org?node_id=917369


in reply to Re^2: perl error
in thread perl error

@Matrix[$row($a+180)][$column($b+180)] += 1;

should be something like

$Matrix[$row($a+180)][$column($b+180)] += 1;

Replies are listed 'Best First'.
Re^4: perl error
by dreadpiratepeter (Priest) on Jul 29, 2011 at 00:18 UTC
    He definitely wants $row[$a+180] rather than $row($a+180) in the matrix operation, but I really think he wants just $a+180, since he never fills @row and @column with anything other than 0.


    -pete
    "Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."
Re^4: perl error
by topaz (Initiate) on Jul 29, 2011 at 00:05 UTC
    Yes ofcourse, sorry I missed that :s Many thanks for your help :)