perl中使用split时不想省略结尾空白,第三个参数 —1怎么用?
1个回答
展开全部
split /PATTERN/,EXPR,LIMIT
If LIMIT is specified and positive, it represents the maximum number of fields the EXPR will
be split into, though the actual number of fields returned depends on the number of times
PATTERN matches within EXPR.
就是限定分割上限,最多分成几个部分。详见 perldoc -f split
If LIMIT is specified and positive, it represents the maximum number of fields the EXPR will
be split into, though the actual number of fields returned depends on the number of times
PATTERN matches within EXPR.
就是限定分割上限,最多分成几个部分。详见 perldoc -f split
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询