$_ = '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"; } ~