title: Values from IF statement regex match (Perl)
body: <p>I'm currently extracting values from a table within a file via REGEX line matches against the table rows.</p>
  
  <pre><code>foreach my $line (split("\n", $file)) {
      if ($line =~ /^(\S+)\s*(\S+)\s*(\S+)$/) {
          my ($val1, $val2, $val3) = ($1, $2, $3);
  
          # $val's used here
      }
  }
  </code></pre>
  
  <p>I purposely assign vals for clarity in the code. Some of my table rows contain 10+ vals (aka columns) - is there a more efficient method of assigning the vals instead of doing ... = ($1, $2, ..., $n)?</p>