@array1[2] = @array2[2] = 'hi'; if ($array2[2] eq $array1[2] ) { print $array2[2]; print "\n"; } # prints this: hi