title: Perl regex - why does the regex /[0-9\.]+(\,)/ match comma
body: <p>The following seems to match <code>,</code>
  Can someone explain why?</p>
  
  <p>I would like to match more than one Number or point, ended by comma.</p>
  
  <pre><code> 123.456.768,
   123,
   .,
   1.2,
  </code></pre>
  
  <p>But doing the following unexpectedly prints <code>,</code> too</p>
  
  <pre><code>my $text = "241.000,00";
  foreach my $match ($text =~ /[0-9\.]+(\,)/g){
      print "$match \n";
  }
  print $text; 
  
  # prints 241.000,
  #        ,
  </code></pre>
  
  <p><strong>Update:</strong> <br>
  The comma matched because:
  <code>In list context, //g returns a list of matched groupings, or if there are no groupings, a list of matches to the whole regex</code>
  As defined <a href="http://perldoc.perl.org/perlrequick.html#More-matching" rel="nofollow">here.</a></p>