- 论坛徽章:
- 0
|
原帖由 xiaoyafeng 于 2006-12-14 18:14 发表
不知道为什么大家都这么喜欢用/s?个人感觉不是一个好习惯.为什么不用f/f操作符?
while (<DATA>) {
...
Very Strange QUESTION!?
That 's depends totally on your request.
If you treat a data as SCALAR string to process it at once (say such as multilines),
regex with /s is a choice.
If you want to treat a data (contains multilines) per line (per element),
you can use loop funnction (for, foreach, while) (option with filehandel) to process
it for each! Using split "\n", MUTILINE:STRING to hadle is an array or list.
--ulmer |
|