perl5中\z和\Z匹配字符串结尾的差异是什么

perl5中\z和\Z匹配字符串结尾的差异是什么

问题描述:

我在使用\z和\Z匹配的时候没发现差异,各位能不能帮忙解释一下,下面是代码:
#!/usr/bin/perl
use 5.010;
use strict;
use warnings;

    $_ = "This is a wilma line barney is on another line
    but this ends in fred and a final dino lines";
            if(/line\Z/){
                            print "it mathed\n";
                    }else{
    print "it doesn't match!\n"
    }

结果显示没有匹配,\Z不是匹配行末尾吗,后面可以有换行的,为什么没匹配上第一行末尾呢?