以下似乎匹配,
有人可以解释为什么吗?
我想匹配多个以逗号结尾的数字或点。
 123.456.768,
 123,
 .,
 1.2,
但是执行以下操作,也会意外打印
my $text = "241.000,00";
foreach my $match ($text =~ /[0-9\.]+(\,)/g){
    print "$match \n";
}
print $text; 
# prints 241.000,
#        ,
更新: 
逗号匹配,因为:
In list context, //g returns a list of matched groupings, or if there are no groupings, a list of matches to the whole regex
如此处定义。