foreach my $con ( @consonants ) { foreach my $vow ( @vowels ) { .. } } #### foreach my $con_1 ( @consonants ) { foreach my $vow_1 ( @vowels ) { foreach my $con_2 ( @consonants ) { foreach my $con_3 ( @consonants ) { foreach my $vow_2 ( @vowels ) { foreach my $con_4 ( @consonants ) { ... } } } } } } #### #!/usr/bin/perl my $template = shift || die "usage: $0