[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Folder recursion and recognition problem



> I have a feeling it's something quite basic staring me in the face but i'm

readdir returns just the list of names in the directory, not the full paths.
You will need to either chdir to that dir before the stat (-d xxx) AND
chdir back when down (::), OR you will need to build a new path by
joining the dir and path together, adding a : in between if there isn't
one already. 

If you do the path building approach, you should abstract it into
a set of functions since it won't work on all platforms.  Each OS has
it's own rules for building paths.  There may even be a perl module that
does this already?  Anyone?

--ed