while (/TATA/g) { print "Matched 'TATA' at position ", pos, "\n"; }