How to perform string mapping for a value stored in a variable?
Example:
I have my output in a variable say “a”.
set a "a.b12.d4" (its unknown)
Is it possible to use string map to map contents of $a as “\t” in another variable say b?
like,
set c [string map {"contents of $a" "\t"}$b]
{I know $a cannot be used here. Is there a way to subtitute contents of $a here in string mapping?}
It is possible if you do not use curly braces as they prevent substitution: