Whoa!! Perl was not meant to make you work so hard!!
For changing directory...used function chdir (perldoc -f chdir)
For getting teh directories...well
opendir (DIR,"$myCurDir");
foreach (readir(DIR)) {
if (-d $_) {
Change to the directory
}
}
Probably you an use recursion to achieve your ends...
-----Original Message-----
From: Torres, Jose [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 23, 2002 12:03 PM
To: '[EMAIL PROTECTED]'
Subject: command-line commands within a Perl script
Hi,
I have a directory with several subdirectories, each full of several dozen
Word files. For each subdirectory, I need to run the checksum app against
all of that directory's files and output a file into that directory with the
checksum results. How can I do this? I'm very unfamilar with running
command-line commands from within an Perl script. I know to change
directories, you can do something like this:
$changeDir = "cd ".$startingDir;
system($changeDir);
but what about retrieving the list of subdirectories from the starting
directory? How can I do this?
Thanks for your 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]