title: Is there a one-liner to get the first element of a split?
body: <p>Instead of writing:</p>
  
  <pre><code>@holder = split /\./,"hello.world"; 
  print @holder[0];
  </code></pre>
  
  <p>is it possible to just do a one-liner to just get the first element of the split? Something like:</p>
  
  <pre><code>print (split /\./,"hello.world")[0]
  </code></pre>
  
  <p>I get the following error when I try the second example:</p>
  
  <pre><code>print (...) interpreted as function at test.pl line 3.
  syntax error at test.pl line 3, near ")["
  </code></pre>