title: perl get last N times of matches within a line
body: <p>I want to get N+1 parts separately from single line string $a1, where the first part of $a1 difintely contains characters, may contain digits, comma, single space or consecutive multiple spaces.
  while for parts2 to partN+1 contains only numbers.</p>
  
  <pre><code>#       (part1)                     (part2)   (part3)  (part4)
  my $a1=' adf  baifdhi ads 1882,  3   123       456     7';
  
  $a1 =~ /^(.*)(\s+\d+){$N}$/;
  $part1 = $1; (no problem here) 
  </code></pre>
  
  <p>But how can I get the numbers for part2 to partN? It seems $2 gives me only the last occurance of match.
  Thanks</p>