if {[file exists $::pubscript(usrlist)]} {
set pubscript(rfile) [open "$::pubscript(usrlist)" "r"]
set pubscript(read) [read $pubscript(rfile)]
close $pubscript(rfile)
set pubscript(wfile) [open "$::pubscript(usrlist)" "w"]
foreach line [split $pubscript(read) \n] {
if {![string match {} [lindex $line 0]]} {
puts "$line"
}
}
close $pubscript(wfile)
}
I know it can be done mutch simpeler but could someone point me out what is wrong with this cause it seems that everytime i do this that all data is lost been staring hours at hit but just can't put my finger on it ..