title: Perl split function for the first word
body: <p>I am completely new to the Perl programming.
  I am trying the split function.
  Here is my code: </p>
  
  <pre><code>#!perl;
  use strict;
  use warnings;
  use Data::Dumper;
  
  my @sections = ("Hard Drive", "Multi Drive");
  foreach my $secname (sort @sections) 
  {
      my $file_name=split / /, $secname;
      print $file_name;
  }
  </code></pre>
  
  <p>so I am trying to get the output like only second word only.</p>
  
  <p>output is 
  <code>22</code></p>
  
  <p>The expected output is:</p>
  
  <pre><code>drive
  drive
  </code></pre>
  
  <p>Here I am trying to get second word but it is not giving the expected output.</p>
  
  <p>Please anyone suggest and help me.</p>