http://qs1969.pair.com?node_id=291664


in reply to Hits on a reg expression

What's this weirdness with @files? You declare the array, add one element to it using push, then loop over it. Why? It's totally unclear to me what your intention is. Do you want to apply the regex to each line of the document you fetched, and count the matches? Do you want to know the number of matches against the entire document? That the above code gives a result of 1 hit is logical - all you do is asking whether abcdef appears in the document. You either get one hit, or no hit at all.

Abigail