in reply to Surprised by repetition (x) operator applied to a list
Construct an anonymous array with copies of @list as its content; and then replicate the reference to it $nelts times.
Construct $nelts (different) anonymous arrays, that each contain copies of @list.
How would you do it?
I generally omit the block for that type of expression:
my @arr = map[ @list ], 1 .. $nelts;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Surprised by repetition (x) operator applied to a list
by Athanasius (Archbishop) on Mar 30, 2014 at 03:55 UTC |