foreach (@masterarrray) { print int @$_; # prints the length of the array print "@$_"; # prints the contents print $$_[0]; # prints the 0th element # ... etc ... }