As with regular pattern matching, any capturing parentheses that are not matched
in a "split()" will be set to "undef" when returned:
@fields = split /(A)│B/, "1A2B3";
# @fields is (1, ’A’, 2, undef, 3)
[问题]谁能解释一下这段话?
- 5451vs5451
- 帖子: 345
- 注册时间: 2006-07-14 18:56
- 来自: Apple Valley, Planet Tux, Linux System
-
- 帖子: 15
- 注册时间: 2007-01-11 16:41
- 5451vs5451
- 帖子: 345
- 注册时间: 2006-07-14 18:56
- 来自: Apple Valley, Planet Tux, Linux System