in reply to matching problem
$_ = 'This is a wilma line barney is on this line but this line ends with fred and a final dino line' ; if (/^barney/m) { print "Found barney \n"; } else { print "Barney not found \n"; } $_ = 'This is a wilma line barney is on this line but this line ends with fred and a final dino line' ; if (/^barney/m) { print "Found barney \n"; } else { print "Barney not found \n"; } __END__ Outputs: Barney not found Found barney
|
---|