Lookat File::Find which should do what you want? Here is one simple which just
prints all directories under a specified top directory:
use File::Find;
find(\&wanted, 'x:/start/directory'); # starting directory goes here
sub wanted {
print "$File::Find::name\n " if ( -d $_ );
}
You place where you want to start and then go from there. Look at the doc.
Wags ;)
-----Original Message-----
From: Torres, Jose [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 05, 2001 08:07
To: '[EMAIL PROTECTED]'
Subject: traversing Windows directories
Hi,
How do you traverse Windows directories in Perl? Let's say J:\foo\bar\logs
has a variable number of folders, each of which I want to look into for a
specific file. How would I do this? Thanks for all help.
-Jose
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]