Updated 2011-01-24 13:29:01 by RLE

plist is an analog of parray that I concocted one evening on the Tcl'ers chat.

DKF
 proc plist {varname {channel stdout}} {
    upvar 1 $varname var
    set len [string length [expr {[llength $var]-1}]]
    incr len 2
    set i 0
    foreach val $var {
       puts $channel [format "%s%-*s = %s" \
               $varname $len \[$i\] [lindex $var $i]]
       incr i
    }
 }