I have two arrays of strings that I would like to compare for equality:
my @array1 = (\"part1\", \"part2\", \"part3\", \"part4\"); my @array2 = (\"part1\", \
There's Test::More's is_deeply() function, which will also display exactly where the structures differ, or Test::Deep's eq_deeply(), which doesn't require a test harness (and just returns true or false).