my @array = ( [ 1..3 ], [ 2..6 ] ); foreach my $outer (@array) { foreach my $element (@$outer) { print "$element\n"; } }