hello.. i have one variable $nicks and inside i set some nicks like "nick1 nick2 nick3 nick4 nick5" is it possible to split the variable and set the nick1 like $nick1 = nick1 (from previus variable after split) $nick2 = nick2 ... up to nick5 just want to split the 1st variable to 5 like nicks..
set nicks "nick1 nick2 nick3 nick4 nick5"
#use this if there could be more than 5 nicks in $nicks
for {set i 0} {$i < 6} {incr i} {
set nick[expr $i + 1] [lindex [split $nicks] $i]
}
#or you could use this if it conatins max 5 nicks
foreach {nick1 nick2 nick3 nick4 nick5} [split $nicks ] {}