newbie: foreach



I'm sure the below can be simplified with some sort of "foreach", but
so far I've failed. Anyone help please?
Snippet of code attached:

#######################################################################
# Display prompt; push the partial line of text to the console
proc yes_no {userlib} {
puts -nonewline "Do you want $userlib Libraries (enter Y/N)? "

flush stdout
# Loop until we have satisfactory input
while {1} { #loop forever until told to stop
gets stdin line
set ans [string tolower [string index $line 0]]
if {$ans == "y"} {
set yes 1
break ;# get out of while loop
} elseif {$ans == "n"} {
set yes 0
break ;# get out of while loop
} else {
puts -nonewline "Try again: $userlib Libs (Y/N)? "
flush stdout
}
}
return $yes
}
#######################################################################

set yes_Actel_apa [yes_no Actel_apa]
set yes_Actel_act1 [yes_no Actel_act1]
set yes_Actel_act2 [yes_no Actel_act2]
set yes_Actel_act3 [yes_no Actel_act3]


if {$yes_Actel_apa == 1} {
puts $hdsnew "apa = C:/Actel/MS57e_D61_SP1/lib/vtl/95/mti/apa"
}
if {$yes_Actel_act1 == 1} {
puts $hdsnew "act1 = C:/Actel/MS57e_D61_SP1/lib/vtl/95/mti/act1"
}

if {$yes_Actel_act2 == 1} {
puts $hdsnew "act2 = C:/MS57e_D61_SP1/lib/vtl/95/mti/act2"
}

if {$yes_Actel_act3 == 1} {
puts $hdsnew "act3 = C:/MS57e_D61_SP1/lib/vtl/95/mti/act3"
}

.