Hacker News new | ask | show | jobs
by pwg 1093 days ago
> Why didn't you show instead how to output arguments joined by a comma or some other separator instead of space.

The Tcl variant to output "comma" as separator (note -- this is not "CSV").

     puts [join $argv ,]
If you wanted "comma space" you'd do:

     puts [join $argv ", "]
If you actually wanted "CSV" then it would be (assuming tcllib is installed):

     package require csv
     puts [csv::join $argv]