I'm attempting to create a very simple array in TCL but I can't figure out the syntax to make it append text to a variable in an assignment. Here is what I am trying to do:
set var1 "some text"
set var2 "other text"
array set arrValues {
1 $var1 + _text
2 $var2 + _text
3 $var1 + _different_text
4 $var1 + _different_text
}
How do I tell it that it should treat $var1 + _text as the data that needs to get inserted without needing to make another variable outside of the array?