title: how to form a new array based on part of an existing array
body: <p>I was trying to build a new array based on an existing array.</p>
  
  <pre><code>#!/usr/bin/perl
  #join
  use warnings;
  use strict;
  
  my @names = ('jacob', 'michael', 'joshua', 'mathew');
  my @t_names = join ("\t" , @names);
  my @t_names2 = join ("\t", $names[0],$names[2]);
  print @t_names, "\n";
  print @t_names2, "\n";
  </code></pre>
  
  <p>The test script allows me to join 2 elements from the old array to form a new array. But what if my array has 1000 elements and I would like to form a new array that contains only a selective portion of the 1000 elements (say, element 3 and 3 multiples). I tried <code>join ("\t", $names[0,2])</code> but perl doesn't recognize <code>$names[0,2]</code> (output suggests that <code>$names[0,2]</code> is "recognized" as <code>$names[2]</code>. And not sure what this error means "<code>multidimensional syntax not supported at join.pl</code>"</p>
  
  <p>If <code>join</code> is not the right function, what other way could I build a partial array from an existing array? Thank you.</p>