for my $i (0..$#readingbooks){ for my $j (0..$#catbooks){ if (($readingbooks[$i] eq $catbooks[$i])...