title: Perl push into a sorted array
body: <p>Consider the data block below, how can I maintain sorted the array by the 3rd field, and keep pushing items?</p>
  
  <pre><code>$VAR1 = [
            '1111',
            'http://...',
             3       #this is one of the 3rd field mentioned above
          ];
  $VARN = [
             '5555',
             'http://...',
              0
          ];
  </code></pre>
  
  <p><br>
  My code looks like:</p>
  
  <pre><code>my @curItem = ($item-&gt;{id}, $item-&gt;{href}, getTotal( $item-&gt;{id}) );
  push @items, \@curItem;
  </code></pre>
  
  <p>I've found <a href="http://search.cpan.org/perldoc/Tie%3a%3aArray%3a%3aSorted" rel="nofollow">this</a> module which is similar to what I need.</p>
  
  <p><em>Any help appreciated.</em></p>