#!/usr/bin/perl $_ = "This is first sentence."; print "1st: match\n" if (/^This/ and /\.$/ and !/first/); $_ = "This is second sentence."; print "2nd: match\n" if (/^This/ and /\.$/ and !/first/);