|
|
|
|
|
by greenpeas
1093 days ago
|
|
#!/usr/bin/env tclsh
puts $argv
I kinda wanted to stop reading after this example. It feels dishonest to start with an example for which there is a builtin. Why didn't you show instead how to output arguments joined by a comma or some other separator instead of space.
If I were to update the Go or Python examples to use another separator, it'd be just a 1-2 character change, whereas for Tcl I have no idea how that would look. |
|
The Tcl variant to output "comma" as separator (note -- this is not "CSV").
If you wanted "comma space" you'd do: If you actually wanted "CSV" then it would be (assuming tcllib is installed):