模式测试程序

#/usr/bin/perl

use 5.010;



while(<>){

    chomp;

    if (/YOUR_PATTERN_GOES_HERE/) {

        say "${^PREMATCH}|${^MATCH}|${^POSTMATCH}";

     } else {

         say "No match:   |$_|\n";

     }



}

你可能感兴趣的:(测试)