sub loop_eq { return 0 if $#a1 != $#a2; for(0..$#a1) { return 0 if $a1[$_] ne $a2[$_] } return 1; }