my @array1 = ("one", "two" . $" . "three"); my @array2 = ("one" . $" . "two", "three"); if ( do{ @array1 == @array2 and "@array1" eq "@array2"} ) { print 'They are the same', $/; # no, they are NOT }