in reply to Re^2: How to duplicate every member of an array
in thread How to duplicate every member of an array
perl -MData::Dump -M"5;push @ARGV,reverse @ARGV" -e "push @m,shift,pop while @ARGV;dd @m" a b c
("a", "a", "b", "b", "c", "c")
L*
PS hello soblanc and welcome to the Monastery and to the wonderful world of Perl!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to duplicate every member of an array -- oneliner
by AnomalousMonk (Archbishop) on Jul 28, 2022 at 12:30 UTC | |
|
Re^4: How to duplicate every member of an array -- oneliner
by soblanc (Acolyte) on Jul 28, 2022 at 14:05 UTC |