in reply to Re^3: 2 D array
in thread 2 D array
So, @row = ((0) x 361); is creating a one-element list whose element is a scalar string of 361 zeros.('0000000000000000 ... 00000')
No. 0 x 361 would do that. (0) x 361 creates a list of 361 zeroes.
>perl -E"say for (0) x 5;" 0 0 0 0 0 >perl -E"say for 0 x 5;" 00000
Yeah, that's a pretty quirky syntax.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: 2 D array
by ff (Hermit) on Jul 29, 2011 at 17:41 UTC |