I have two arrays of strings that I would like to compare for equality:
my @array1 = (\"part1\", \"part2\", \"part3\", \"part4\");
my @array2 = (\"part1\", \
For checking equality of two arrays try this. In given code, if %eq_or_not has any value then both arrays are not equal otherwise they are equal.
my @array1 = ("part1", "part2", "part3", "part4");
my @array2 = ("part1", "PART2", "part3", "part4");
my %eq_or_not;
@eq_or_not{ @array1 } = undef;
delete @eq_or_not{ @array2 };