Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: File search using Grep

by targetsmart (Curate)
on Jun 26, 2009 at 05:59 UTC ( [id://774929]=note: print w/replies, xml ) Need Help??


in reply to File search using Grep

so will the following code have issues?
you have to run and tell us what issue it is having

why can't you use the grep utility; if you are using *nix system.


Vivek
-- 'I' am not the body, 'I' am the 'soul', which has no beginning or no end, no attachment or no aversion, nothing to attain or lose.

Replies are listed 'Best First'.
Re^2: File search using Grep
by Anonymous Monk on Jun 26, 2009 at 06:10 UTC
    vivek, Actually we were planning to load the info in Config1 as hashes and then use it find the value. But as the file increases in size we were worried about the hash performance, so looked at this as alternate approach. So will the hash be better or this? Thanks
      IMO, if the comparison is not involving too many complexities, better use grep
      But it seems that you are ready to load such a big file into hashes, you can use DBM::Deep But since the data is stored in a file, it will not be as quick as normal hash.
      If you give more information about what/why you are trying to load and what/why you are trying to compare, you will get best possible solutions


      Vivek
      -- 'I' am not the body, 'I' am the 'soul', which has no beginning or no end, no attachment or no aversion, nothing to attain or lose.
      There is no data structure that can beat a hash for look-up's. The Perl hash algorithm isn't theoretically perfect, but it is damn fast. End of story.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2025-12-06 18:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (85 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.