in reply to Re: It does exactly the opposite of what I want it to!
in thread It does exactly the opposite of what I want it to!

In fact, it appears that you can use 5.6's File::Find "out of the box", since on re-reading your code, you appear to just want to descend into both symlinks and "real" directories, in that order, and 5.6's find() can be told to chase links (reliably, I might add, without a chance for looping).

-- Randal L. Schwartz, Perl hacker

  • Comment on RE: Re: It does exactly the opposite of what I want it to!

Replies are listed 'Best First'.
RE: RE: Re: It does exactly the opposite of what I want it to!
by SamQi (Beadle) on Sep 22, 2000 at 22:19 UTC

    First off, I'm in 5.5.3 (5.005_03)...so I can't tweak it.

    However, what I want to do is, given the directory structure I posted above I want to follow the following logic:

    1. Parse any perlish files (determined by the shabang line...but this works) in the directory
    2. If there is a symlink to a directory, and the symlink is named "bin" or "current" go look at it, and don't look at any of the other directories.
    3. failing that, look in all the directories. (start at #1 for each, etc, recursing down).

    At the moment what it does is give me all the directories I don't want, and doesn't give me the one I do. I need a strategically placed !, but I can't quite figure out where to put it.