Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Hits on a reg expression

by Abigail-II (Bishop)
on Sep 15, 2003 at 21:22 UTC ( #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? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2022-12-05 15:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?