At first glance, your @array1 and @array2 will each be single element arrays containing an array reference because you have used square brackets rather than parentheses. Do either
my @array1 = ( ... );
or
my $refToArray1 = [ ... ];
I've not looked beyond that but in each case you are trying to sort single elements which is probably not what you want.
Cheers,
JohnGG
In reply to Re: Compare complex perl data structures
by johngg
in thread Compare complex perl data structures
by AnishaM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |