in reply to Tk with map - Perl newbie
why you wrote this way:
you assign 2-element list to 4 variables, so last two are undefined.my ($dfHost, $dfPort, $dfUser,$dfPassword) = map {$fRight->Entry( -textvariable=>$_ )->pack(-side=>'top',- +pady=>3)} qw/\$user \$password/;
But more to the point, if you'll write
your code works as expected.$fRight->Entry( -textvariable=>\$user )->pack(-side=>'top',-pady=>3 +); $fRight->Entry( -textvariable=>\$password )->pack(-side=>'top',-pad +y=>3);
(addition) qw/\$user .../ does not do what you want
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tk with map - Perl newbie
by stickleback (Novice) on Mar 31, 2011 at 13:56 UTC | |
by Marshall (Canon) on Apr 02, 2011 at 19:22 UTC | |
by vkon (Curate) on Mar 31, 2011 at 19:20 UTC |