I am using these statements in a loop to read all the files in a directory and make modifications to each file. My problem is that I am picking up subdirectoies also. How can I ID the subdirectories and skip them. I'm fairly new to perl please show me what the statement should be to skip the $file if it is a directory. (next if -d $file;) does not work(Gtthorne@Hotmail.com).
opendir (DIR, $srcname) || die "can't open dir $srcname: $! \n";
while (defined($file = readdir(DIR)))
{next if $file =~ /^\.\.?$/;
.
.
.
}