in reply to How do I double up elements within an array?
ikegami's solution is simple and elegant, as well as being what I would probably use. But, for the sake of TIMTOWTDI, and to introduce a very handy module, let me suggest:
use List::MoreUtils qw(zip); my @orig = qw(1 33 45 66); my @doubled = zip @orig, @orig; print "@doubled\n";
TGI says moo
|
|---|