in reply to perl error
Perl knows that 'Matrix' is an array because of the [ ] which follows the name (just as if it was a hash it would have { } following). The $ indicates the context of what is inside the [ ], in this case a scalar. Using @ would indicate that a list of indexes is inside the [ ], which is perfectly legal, and generally known as a slice.my @Matrix; $Matrix[$a] = 1;
|
|---|