Posted to tcl by dandyn at Thu May 18 13:58:39 GMT 2023view raw

  1. set animalsDog "small dog"
  2. set animalsCat "big cat"
  3. set animalsRat "medium rat"
  4.  
  5. set x ""
  6. foreach animal [info vars animals*] {
  7. lappend x $animal
  8. }
  9.  
  10. puts $x