in reply to Re: file comparison
in thread file comparison

one thing to consider in the below code is that a "directory" is a file. This means the "." and ".." are files too! I congratulate you on using readdir rather than "globbing". This is much more portable and is the right way to go. I would put a grep to filter to the "real files",
opendir(DIR, $RemoteSubDirectory); my @rFileCheck = grep {-f $RemoteSubDirectory/$_ }readdir(DIR);
Remember that readdir only gives file names and you have to add the path... Your code:
opendir(DIR, $RemoteSubDirectory); my @rFileCheck = readdir(DIR); closedir(DIR);