Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Search Efficiency

by Abigail (Deacon)
on Jul 11, 2001 at 19:47 UTC ( #95733=note: print w/ replies, xml ) Need Help??


in reply to Search Efficiency

I fail to see your problem. Perl only goes as many times through a file as you tell it to. In the code you give, you scan the file once, and only once. And unless you seek back to the beginning and enter the loop again, Perl isn't going through the file again.

I get the feeling you didn't give us all the code, but if you do, I expect the answer to be "don't do that then".

Note that if you want Perl to stop reading the file in its current iteration, look at the last; statement.

-- Abigail


Comment on Re: Search Efficiency
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2014-08-31 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls