in reply to Re^4: Question of scope and syntax
in thread Question of scope and syntax

Thank you. I actually was getting ready to post my final solution. I used a cpan module that included the exact operation I was looking for.
#!/usr/bin/perl -w use strict; use Array::Utils qw(:all); my $boxEnd; my $pathToDirectory; my $pathToDatabase = "\\\\SHARESERVER\\DigiOfficeShare\\PerlDev\\Datab +ase.txt"; my @contentsOfDataBase; my @contentsOfDirectory; print "First Box?", "\n"; chomp (my $boxBegining = <>); print "Last Box?", "\n"; chomp ($boxEnd = <>); print "\n", "Wait a minute while I look... Lazy...", "\n"; open my $databaseOutput, $pathToDatabase || die "\n", "Cannot find fil +e.", "\n"; @contentsOfDataBase = <$databaseOutput>; chomp @contentsOfDataBase; close $databaseOutput; while ($boxEnd >= $boxBegining) { my $pathToDirectory = "\\\\SHARESERVER\\DigiOfficeShare\\PerlDev\\Bo +x $boxBegining"; $boxBegining++; opendir(my $currentDirectory, $pathToDirectory) || die "\n", "You su +re that exists, dummy?", "\n"; while(readdir $currentDirectory) { chomp $_; push(@contentsOfDirectory, $_); } closedir $currentDirectory; } @contentsOfDirectory = grep (!/^\./, @contentsOfDirectory); my @minus = array_minus( @contentsOfDirectory, @contentsOfDataBase ); my @minus2 = array_minus( @contentsOfDataBase, @contentsOfDirectory); print "\n", "These files have PDFs and no database entries:", "\n", "\ +n", "\n"; foreach (@minus){ print "\n", "$_ ", "\n"; } print "\n", "These files have databse entries and no PDFs:", "\n"; foreach (@minus2){ print "\n", "$_ ", "\n"; }