If you do that, you will be invoking the shell, changing the current
directory for the shell, and then closing the shell.  What you want is to
use the chdir() Perl function to change the current directory of your Perl
script.  

perldoc -f chdir

-----Original Message-----
From: Torres, Jose
To: '[EMAIL PROTECTED]'
Sent: 5/23/02 9:03 AM
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]

Reply via email to