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


in reply to Filling an array

Use the x (repetition) operator:
my @arr = (1)x100;
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.

- robsv