for(my $i = 0; $i < @binarray; $i++) { for(my $j = 0; $j < @binarray; $j++) { print "$binarray[$i][$j]\n"; } }