Forum Discussion
unRuleY_95363
May 20, 2005Historic F5 Account
No, you should not need to quote the /. In general, the only time you need to quote something is if it contains spaces.
However, I often find myself quoting strings to help remind me that it is a string literal vs. a Tcl command.
Also note that using braces {} often accomplishes the same effect as quoting, but with a subtle difference. Braces create a Tcl list, which when referred to as a complete entity appears the same as a quoted string. So, in the example below, the two forms are generally equivalent unless a particular command is expecting a list, then the latter form is required:
set bar "This is a string"
set foo {This is a list}
However, there is a subtle performance difference between the two. The list causes Tcl to allocate a list object containing each list element in its own a seperate object. So, though the intended result appears the same, the list form has a larger impact on performance.
Hope this helps.