The last thing we will be covering is how to take a string and split its content into a proper Tcl list. To accomplish this, Tcl provides the split
command. The syntax is as follows:
split string characters
In the following example, we will use the split command
to separate the contents of a comma-delimited string into a list. Return values from the commands are provided for clarity. Enter the following command:
% split {John,Mary,Tom,Fred,Sally},
John Mary Fred Tom Sally
18.217.254.118