Okay...I'm moving my question from Q&A to here...

I'm writing a script to test for perl versions.

Now here are the requirements I want it to have:
  1. Don't recurse directories
    This much I've got mostly figured out, but am still a bit fuzzy on. It is bascially going to be at the top level of my search telling the script to just not touch some of the big directories that I don't *need* to search.
  2. Only test in the *current* bin directories:
    This part is what's really stumping me, I've sort of got it figured out, and it's more of an algorithm question than anything. We have it set up so that each project has a separate directory, and in that directory there is a symlink (each one may be named differently) that points to the directory with our current version. I want to follow that symlink and parse the directory it points to (as it's pointed to) So far I've come up with something of to the effect of:
    if(-l File::Find::name)
    { #dosomething with readlink File::Find::name }
    However, some of the directories I want to recurse into (most of them are at the top level of the tree I'm recursing) aren't going to have the symlink structure that I described above. However, inside those directories, there *is* the symlink structure.

I want to be able to just run my script in the directory at the top of the tree and let it recurse thru all the directories I want it to without having to hardcode locally dependant paths into the script.

Any ideas, monks?


In reply to Help with File::Find by SamQi

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.