note
crenz
<p>Danke nach Frankfurt!</p>
<p>There are a few bugs in your code, though. I changed the <code>if</code> to a <code>while</code> loop and fixed a few other problems:</p>
<code>
while ($str =~ /searchword/g) {
my $loc = tell($fh) - length($str) + pos($str);
print "Found a match starting after $loc.\n";
}
</code>
<p><b>Update:</b> That doesn't quite work either... it finds too many occurrences...</p>
516706
516709