in reply to TK "textvariable" not updating with @var but ok with $var
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: TK "textvariable" not updating with @var but ok with $var
by mark4 (Acolyte) on Jan 27, 2017 at 00:30 UTC | |
by mark4 (Acolyte) on Jan 27, 2017 at 00:49 UTC | |
by Anonymous Monk on Jan 27, 2017 at 01:18 UTC | |
by mark4 (Acolyte) on Jan 27, 2017 at 01:08 UTC | |
by huck (Prior) on Jan 27, 2017 at 01:27 UTC | |
by mark4 (Acolyte) on Feb 05, 2017 at 15:58 UTC |