So close:)
@array[0..3] = (1000) x 4;
A little explanation:
Slices (whether array or hash) always start with the '@' sigil. See perldata search for "Slices".
x is the perl repetition operator. See perlop Search for "Multiplicative Operators".
In reply to Re: Array How to/Performance: mass initialization or update using array slice
by BrowserUk
in thread Array How to/Performance: mass initialization or update using array slice
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |