title: How do I get the first item from a function that returns an array in Perl?
body: <p>I have a function that returns an array, and I'd like to get just the first item from that array without ever declaring a variable for the array. Basically, it should be something like:</p>
  
  <p><code>functionReturningArray()[1]</code></p>
  
  <p>Except that doesn't work. </p>
  
  <p>I really don't want to waste space declaring the whole array since I don't need it, and I'd rather not waste an extra line of code. Anyway to do this in one line?</p>