How to insert an array into another array in Perl?

Given an array called @names = qw(Foo Bar Baz); and another array called my @languages = qw(Perl Python Ruby PHP); how can
the @languages array be inserted in the "middle" of the @names array?

Of course I think the "middle" only means - "somewhere" and not that "the same distance from the beginning and from the end",
but we have another issue with the task.

There can be two types of insertions. Flattening, when the elements of @language become elements of @names, and thus
at the end of the operation @names will have 7 elements; or it can be non-flattening, that will create a sort-of
two-dimensional array. In this case @names will have 4 elements after the operation, one of them is a reference
to an internal array that holds the elements of @languages.

The solution to the two cases is quite similar. They both use the
splice function.
Maybe we just need to adjust how we call the operation:

in which we can reach the values of the inserted array by using the the appropriate index
on the main array.

Beside one leaving a one-dimensional array behind and the other one creating a two-dimensional array, there is another
big difference between the two. What if after inserting the array we change the original @languages array?

Changing the content of the array

In the first case, the content of @languages changes but the content of @names remains the same
as it was after the call to splice.

Changing the content of the references array

On the other hand, if we take the case when we inserted a an array reference in the
array and created a two dimensional array, then the internal array remains "connected"
to the original array. Thus if we change the @languages array (setting element 2
to be JavaScript) this change will be reflected both in @languages and in
the internal array of @names. (See JavaScript in the 2 last dumps below)

This happens because in the second case we have copied the reference of the array but now both @languages and
$names[1] point to the same location in the memory. So if we change the content of either of those, the
other one will change too.