my @D = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
my @E = qq(a b c d e f g h i j k l m n o p q r s t u v w x y z);
my @F = (1, 3, 5, 7, 9);
my @G = qq(a b c d e f g h i j k l m);
my @H = (2, 4, 6, 8);
my @K = qq(n o p q r s t u v w x y z);
my @M = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
my @P = qq(a b c d e f g h i j k l m n o p q r s t u v w x y z);
my @S = (1, 3, 5, 7, 9);
my @T = qq(a b c d e f g h i j k l m);
my @x = (2, 4, 6, 8);
my @Z = qq(n o p q r s t u v w x y z);
####
use warnings;
use strict;
use diagnostics;
# use carp;
sub check_same (\@\@);
my @D = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
my @E = qq(a b c d e f g h i j k l m n o p q r s t u v w x y z);
my @F = (1, 3, 5, 7, 9);
my @G = qq(a b c d e f g h i j k l m);
my @H = (2, 4, 6, 8);
my @K = qq(n o p q r s t u v w x y z);
my @M = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
my @P = qq(a b c d e f g h i j k l m n o p q r s t u v w x y z);
my @S = (1, 3, 5, 7, 9);
my @T = qq(a b c d e f g h i j k l m);
my @x = (2, 4, 6, 8);
my @Z = qq(n o p q r s t u v w x y z);
print "\@D is not the same as \@E" if check_same (@D,@E,@F,@G,@H,@K,@M,@P,@S,@T,@X,@Z);
print "\@D is the same as \@F" if check_same (@D,@E,@F,@G,@H,@K,@M,@P,@S,@T,@X,@Z);
sub check_same (\@\@) {
my ($ref_one, $ref_two,) = @_;
# same size?
return 0 unless @$ref_one == @$ref_two;
for my $elem (0..$#$ref_one) {
return 0 unless $ref_one->[$elem] eq $ref_two->[$elem];
}
# same if we got this far
return 1;
}