Charles and Jenda, thanks for your responses. In addition to the change that
you both suggested, I had a problem with the array variable @directory in my
exists test. I was testing the entire array instead of just the current
cell. Charles, thanks for your suggestion on opendir, I will look into
I am working on a bit of logic to be used in a script that copies new files
to a temporary directory and I am stumped. Basically what I want to
accomplish is to be able to look for the existence of a file name in a log
file, and I am trying to use a hash to accomplish this.
$directory is the
From: Terry Poperszky [EMAIL PROTECTED]
I am working on a bit of logic to be used in a script that copies new
files to a temporary directory and I am stumped. Basically what I
want to accomplish is to be able to look for the existence of a file
name in a log file, and I am
Terry Poperszky [EMAIL PROTECTED] wrote:
: Suggestions/Observations?
Don't use external commands to get directory contents.
Use 'openddir' and 'readdir' instead.
: open MYFILE, dir_log;
You should always check that I/O succeed.
: while (MYFILE) {
: $dir_log{chomp($_)} =