in reply to Filling an array
Use the x (repetition) operator:
- robsv
Don't forget the parens around the 1 - if they're not there, you'll end up with an array containing one element: 100 1s concatenated together.my @arr = (1)x100;
- robsv
In Section
Seekers of Perl Wisdom