長いと大変そう
ruby にもこういうのありそう

DB<8> @a = qw(a b e)
DB<9> splice @a, 2, 0, qw(c d)
DB<10> print @a
abcde