foreach (@masterarrray) { my @array = @$_; print int @array; # prints the length of the array print "@array"; # prints the contents # ... etc ... }