title: Insert multiple values from an array into another array
body: <p>I need to process a large amount of data in arrays with Perl.
  At certain points, I will need to insert the values of a second array within a primary array.
  I have seen that <strong>splice</strong> should normally be the way to go.  However, after having researched a bit, I have seen that this function is memory intensive and over time could cause a serious performance issue.</p>
  
  <p>Here is basically what I am needing to do -</p>
  
  <pre><code># two arrays
  @primary = [1, 2, 3, 4, 5, 6, 7, 8, 9];
  @second = [a, b, c, d e];
  </code></pre>
  
  <p>Now insert the content of <strong>@second</strong> into <strong>@primary</strong> at offset 4 to obtain -</p>
  
  <pre><code>@primary = [1, 2, 3, 4, a, b, c, d, e, 5, 6, 7, 8, 9];
  </code></pre>
  
  <p>Would using linked lists be the most efficient way to go when I have to handle a primary array which holds more than 2000 elements ?</p>
  
  <p>Note: can anyone confirm that this is the correct way to do it</p>
  
  <pre><code>$Tail = splice($primary, 4);
  push(@primary, @second, $Tail);
  </code></pre>
  
  <p>?</p>