while (@AoA) { my $var = shift @AoA; my ($a, $b) = @{$var}[1,2]; }