develooper Front page | perl.beginners | Postings from April 2010

File::Find and top level directory

Thread Next
Harry Putnam
April 24, 2010 12:01
File::Find and top level directory
Message ID:
When using File::Find;
Is there any built in way to know when you are in the top level of one
of the directories in @directories?

I mean besides grepping $File::Find::dir.

I know that give the current directory name and of course the top
directory could be massages out with something like: 

   my ($tdir) = $File::Find::dir =~  m/^\.\/([^\/]+)/;

I didn't notice anything in perldoc File::Find, that seemed relevant
so I'm guessing there is not any better way to know what is the top
level of currently recursed directory. 

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About