perl择一匹配

#!/usr/bin/perl
foreach ( qw(fred betty barney dino)){
    if (/fred|barney/){
        print "$_ matched ";
    }
}

原文地址:https://www.cnblogs.com/shunguo/p/13549422.html