Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Hits on a reg expression

by Abigail-II (Bishop)
on Sep 15, 2003 at 21:22 UTC ( [id://291664]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://291664]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2024-04-18 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found