If it would be a string of $n occurances of $x, I would simply write $x x $n. Can I do something similarily simple for lists?
@list = ($elem) x $count;
In reply to Re: generating a list of identical elements
by JavaFan
in thread generating a list of identical elements
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |