title: Split data into columns, while ignoring leading white space. PERL
body: <p>Here is a snippet of my raw data:</p>
  
  <pre><code>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND            
       1 root      16   0  2160  604  520 S  0.0  0.1   0:01.60 init               
       2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0        
       3 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0        
       4 root      10  -5     0    0    0 S  0.0  0.0   0:00.39 events/0           
       5 root      12  -5     0    0    0 S  0.0  0.0   0:00.00 khelper            
       6 root      14  -5     0    0    0 S  0.0  0.0   0:00.00 kthread            
       9 root      10  -5     0    0    0 S  0.0  0.0   0:00.36 kblockd/0          
      10 root      20  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid             
     174 root      14  -5     0    0    0 S  0.0  0.0   0:00.00 cqueue/0           
     177 root      10  -5     0    0    0 S  0.0  0.0   0:00.00 khubd              
  </code></pre>
  
  <p>Notice how the left column has leading white space. I want to split each column of this data into its own array. That leading white space is what is giving me trouble when using my split function. </p>
  
  <p>I am using this:</p>
  
  <pre><code>foreach my $line (@data) {
      my @column = split(/\s+/,$line);
      chomp (@column);
      print "$column[0]\n";
  
  }
  </code></pre>
  
  <p>What I want to have happen when I print all the elements in <code>column[0]</code> is it prints all the PID numbers without spaces. When I print <code>column[1]</code> it prints all the USERS without spaces. Because the columns are justified right, everything is messed up. </p>
  
  <p>Thanks.</p>