in reply to How do I double up elements within an array?

my @newarray; for (@array1) { push @newarray, $_, $_; }
or
my @newarray = map { $_, $_ } @array1;

Replies are listed 'Best First'.
Re^2: How do I double up elements within an array?
by Anonymous Monk on Aug 05, 2008 at 19:02 UTC
    man, I wish I could come up with solutions as fast as you guys.
    Thanks Archbishop, that does the trick.
    I guess I'd better start going to church more often. I must've strayed from the straight and narrow somewhere.