Search code examples
listjointcl

Join two strings to form a file name in TCL


I cant get this to work .

set dut xyz
set fname [join {$dut "-CE"} ""]

But This works :

set fname [join {xyz "-CE"} ""]

I want fname as "xyz-CE"


Solution

  • Try the following

    set dut xyz
    set fname ${dut}-CE
    

    Normal word concatenation doesn't need a join.