in reply to Syntax error using Tk

You'll better use variable references in "-textvariable":
my $var; # .... and then ...., -textvariable => \$var, ...

Courage, the Cowardly Dog