in reply to Perl/Tk and the "-variable => \$var" option

While i can't seem to come up with a simple example to demonstrate it, my feeling is that this line: @SLIDERVALUES = (5, 10, 15, 20); results in the 5,10,15,20 being stored in a different place (address).. i.e. that you've pulled the rug out from uder the \$SLIDERVALUES[$i] pointers.. That answer is consistent with direct changes like $SLIDERVALUES[1] = 14; working, but i realize it's still kind of hand-waving... Hopefully another monk can clarify from here..

Here's some code that shows in short the funniest coding on:
my @x = ( 1, 2, 3, 4); my $v = \$x[2]; warn $v; warn "v = " . $$v; warn " " . $_ . " " . \$_ for @x; @x = ( 5, 12, 13, 14); warn $v; warn "v = " . $$v; warn " " . $_ . " " . \$_ for @x; __END__ SCALAR(0x80fbc5c) at /tmp/arr line 6. v = 3 at /tmp/arr line 7. 1 SCALAR(0x80fbb0c) at /tmp/arr line 8. 2 SCALAR(0x80fbc14) at /tmp/arr line 8. 3 SCALAR(0x80fbc5c) at /tmp/arr line 8. 4 SCALAR(0x8120634) at /tmp/arr line 8. SCALAR(0x80fbc5c) at /tmp/arr line 11. v = 3 at /tmp/arr line 12. 5 SCALAR(0x80fbb0c) at /tmp/arr line 13. 12 SCALAR(0x80fbc14) at /tmp/arr line 13. 13 SCALAR(0x8120634) at /tmp/arr line 13. 14 SCALAR(0x810531c) at /tmp/arr line 13.