my @arr = ([1,2],[3,4]); for (@arr) { for (@$_) { print "$_\n"; } }