split问题

split问题

$str = "a,b,c,,,";
@getArry = split /,/,$tr;
这样@getArry  里只有a.b.c三个值,得到整个包括后面的空,应该怎么写.请赐教...
@arr = split /,/,$str,-1;
记得好像是split的一个法则吧,如果分割后面全都是空的话,自动舍弃
split /PATTERN/,EXPR,LIMIT

By default, empty leading fields are preserved, and empty trailing ones are deleted.  (If all fields are empty, they are considered to be trailing.)

If LIMIT is negative, it is treated as if an arbitrarily large LIMIT had been specified.  Note that splitting an EXPR that evaluates to the empty string always returns the empty list, regardless of the LIMIT specified.
my @getArry = split /,/, $str, -1;
多谢各位!!!