Let us assume that I have the following directory structure:
\user \user1 foo.bar \user2 \user4 \user500 foo.bar
Given:
  1. Each of the user directories has a TON of sub directories.
  2. File::Find seems to start at the lowest subdirectory and work it's way up to the root.
  3. I tried bydepth and it does not seem to limit directory depth like I thought that it would
  4. I am looking for foo.bar, and I know that it will be in the 1st subdirectory under users directory
  5. I will not know the names of the users directories (user1, user2) before the script is run
  6. This is not homework, as I have not attended school in a very long time

File::Find would help me find those subdirectories, but it will also check a ton of files and subdirectories (up to 2 gig per user share at times) that I don't need to look at.

I can write it the file::find way, but I question it's efficiency in this situation.

-OzzyOsbourne


In reply to The situational efficiency of File::Find by OzzyOsbourne

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, details, 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, summary, 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.