Hi,
Yes it is possible to explain the behavior
This is forgetting all the textvariables , its making the textvariables forget the array, its disconnecting the array values from the textvariables @var1 = change_var1_2(@var1);
If you do that then the textvariables are lost, the references no longer point to the array
#!/usr/bin/perl -- use strict; use warnings; use Data::Dump qw/ dd / ; my @f = 0; my $fo = \$f[0]; dd\@f; $$fo++; ## @f is updated dd\@f; @f=(); ## $fo no longer points to @f, $fo and @f disconnected $$fo++; dd\@f; __END__ [0] [1] []
Also names, like like variable names, for example @var1/$var1[] ; if you read that out loud it is array variable variable one the @ part tells us its a perl variable of the array variety (array for short), so "var" shouldn't be part of the name
Similarly 1 shouldn't be part of the name, but thats what you have left @1
I would call it @chg or whatever "chg" stands for, maybe @change, something with meaning
In reply to Re: TK "textvariable" not updating with @var but ok with $var
by Anonymous Monk
in thread TK "textvariable" not updating with @var but ok with $var
by mark4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |