title: How do you get multiple arguments in Perl functions?
body: <p>In my code, I'm been using the fairly primitive method of extraction parameters from a function call as follows:</p>
  
  <pre><code>sub addSix ($$$$$$) {
      my ($a, $b, $c, $d, $e, $f) = (shift, shift, shift, shift, shift, shift);
      return $a + $b + $c + $d + $e + $f;
  }
  
  print addSix (1, 2, 3, 4, 5, 6) . "\n";
  </code></pre>
  
  <p>(forget the primitive code, the salient bit is the multiple <code>shift</code> calls).</p>
  
  <p>Now that seems rather messy to me and I though Perl may have something like:</p>
  
  <pre><code>my ($a, $b, $c, $d, $e, $f) = shift (6);
  </code></pre>
  
  <p>or something similar.</p>
  
  <p>But I cannot find anything like that. I know I can use arrays for this but I think I'd still have to unpack the array into individual scalars. That wouldn't be too bad for the example case above, where the six parameters are similar, but I'm more interested in the case where they're not really suitable as an array.</p>
  
  <p>How can you extract parameters without ending up with a morass of <code>shift</code> keywords?</p>