title: How do I add an array ref to the middle of an existing array in Perl?
body: <p>I want to be able to place an array into an array. For example, I may have an array like this:</p>
  
  <pre><code>my @array1 = ("element 1","element 2","element 3");
  </code></pre>
  
  <p>Then I have another array</p>
  
  <pre><code>my $array_ref = ["this will", "go between", "element 1 and 2"];
  </code></pre>
  
  <p>I want to place <code>$array_ref</code> into the first so that the first array
  looks like this:</p>
  
  <pre><code>("element 1",["this will", "go between", "element 1 and 2"],"element 2","element 3")
  </code></pre>
  
  <p>I can't seem to do this. I looked all over Google and found nothing.</p>