my $region1; my $region2; . . . foreach $region1 (@region_list) { foreach $region2 (@region_list) { ... } }