foreach my $row (0..21) { foreach my $col (@vscr) { &do_stuff($col[$row]); } }