use strict; use warnings; my @first = qw(Can unlock secret); my @second = qw(you the code?); my $i = 1; while ( my $word = shift @second ){ splice @first, $i, 0, $word; $i += 2; } print join ' ', @first;
In reply to Re: splicing two arrays together
by ~~David~~
in thread splicing two arrays together
by lblake
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |