in reply to Need Help with reg ex

Based on how I understand your question, this is how I would do it.
#!/usr/bin/perl use strict; my $count = 0; while (<DATA>) { while ( /(aaggt)/g ) { $count++; print "$1 - Count: $count\n"; print "Found at position : " . pos(), "\n"; pos() += 100; } } __DATA__ aatgatgataaggtaaggtatgatgatgatgatgatagtagannnnnnnnnatgcatga'/atgca.atg +actagca/atgactagcaaggtaaggtaaggtaaggtaaggtatgatgatgannnn./atgatgactag +actgacaaggtaaggtaaggtatgatgatgatcgatgacgat