my $i = 0; my @new = map { /^[yz]$/ ? 'I' : $a[$i++] } @b; [download]
In reply to Re: add elements to array at certain positions by repellent in thread add elements to array at certain positions by coldy