in reply to why won't Tk textvariable take a reference to an array element?

When you assign the array, the old $status_label[0] is gone (the entire array is reassigned), the previous reference to it no longer references the array. An alternative to the previous solution (which is only slightly wrong in its reasoning) is an array slice assignment (which assigns to existing elements):
@status_label[0,1] = ("abc","def");
Updated: at the request of serf.

Replies are listed 'Best First'.
Re^2: why won't Tk textvariable take a reference to an array element?
by peter.mao (Novice) on Jan 25, 2006 at 01:59 UTC
    Thanks, runrig and serf.

    The array slice works well. I was pulling my hair out for days on this one and the ugliness of my hack code was getting to me!

    Peter