title: Inserting one hash into another using Perl
body: <p></p>
  
  <p>I've tried many different versions of using push and splice, but can't seem to combine two hashes as needed. Trying to insert the second hash into the first inside the 'Item' array:</p>
  
  <pre class="lang-none prettyprint-override"><code>(
    ItemData =&gt; { Item =&gt; { ItemNum =&gt; 2, PriceList =&gt; "25.00", UOM =&gt; " " } },
  )
  </code></pre>
  
  
  
  <pre class="lang-none prettyprint-override"><code>(
    Alternate =&gt; {
      Description  =&gt; "OIL FILTER",
      InFile       =&gt; "Y",
      MfgCode      =&gt; "FRA",
      QtyAvailable =&gt; 29,
      Stocked      =&gt; "Y",
    },
  )
  </code></pre>
  
  <p>And I need to insert the second 'Alternate' hash into the 'Item' array of the first hash for this result:</p>
  
  <pre class="lang-none prettyprint-override"><code>(
    ItemData =&gt; {
      Item =&gt; {
        Alternate =&gt; {
          Description  =&gt; "OIL FILTER",
          InFile       =&gt; "Y",
          MfgCode      =&gt; "FRA",
          QtyAvailable =&gt; 29,
          Stocked      =&gt; "Y",
        },
        ItemNum =&gt; 2,
        PriceList =&gt; "25.00",
        UOM =&gt; " ",
      },
    },
  )
  </code></pre>
  
  <p>Can someone suggest how I can accomplish this?</p>