Thank you poj.
Just some questions....
Below, I declare my hashs and array (within the sub DirCompare)
my ( %old_list, %new_list, @diffs);Next line, I am looping through $ARCHIVE and reading files or files within folders into $file. This will continue until it reaches the top of the file list or parent directory. $file will then be passed into the hash %old_list
for my $file ( find ( sub { %old_list { $file } = 1 }, $ARCHIVE ) );Next line, I am looping through $SourceDir and reading files or files within folders into $file. This will continue until it reaches the top of the file list or parent directory. $file will then be passed into the hash %new_list
for my $file ( find ( sub { %new_list { $file } = 1 }, $SourceDir ) );The above statements are what I intended when I wrote the code. So my questions are, why do I need to declare the hashs and arrays when they are already declared? Does $file in the inner most brackets need to be '$_' or $file?
In reply to Re^4: Comparing files in directory
by smturner1
in thread Comparing files in directory
by smturner1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |