use re 'debug' 可以查看正则表达式的匹配过程。
use strict; use warnings; use re 'debug'; sub test { my $str = "123456789"; print join(":", split /(?<=...)/, $str); } test();
use strict; use warnings; use re 'debug'; sub test { my $str = "123456789"; print join(":", split /(?<=...)/, $str); } test();