标签:
set w [open 1.txt w+]
foreach a [info var] {
if { [llength [array name $a]]==0 } {
puts $w $a:[set $a]
}
}
foreach a [info var] {
if { [llength [array name $a]]!=0 } {
puts $a
foreach b [array name $a] {
puts $w ${a}($b):[set ${a}($b)]
}
}
}
close $w
标签:
原文地址:http://www.cnblogs.com/hua198/p/5831506.html