Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I don't know your environment, so it is difficult to advocate improvement, or something else. It all depends on where your program is spending too much time, if you are concerned about that. It depends on the number of updates to the searched directories, the timespan searched through, upon the number of files in each, and the size of the files searched. And it all depends on Laziness, Impatience and Hubris.

Off my head, some things to look at:

  • you could delegate the file search to the Findutils suite, running updatedb in reasonable intervals, building a query for locate and filter the list the shelled out locate returns (impatience)
  • you could - depending on the file size - either use grep or perl to search through the files (impatience)
  • have a look at ack for inspiration, if you are going to satisfy your hubris

For laziness - "if it ain't broke, don't fix it" and if there are no complaints - just let the working solution in place.

Hopefully others can provide more ideas...

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

In reply to Re: Searching over multiple directories using unusual logic by shmem
in thread Searching over multiple directories using unusual logic by GotToBTru

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (5)
    As of 2020-09-19 10:04 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      If at first I donít succeed, I Ö










      Results (114 votes). Check out past polls.

      Notices?