print "Match found on line ", split(/\n/, substr $text, 0, pos $text) - split(/\n/, ${^MATCH}) + 1, "\n";