note: I’m writing a GUI using Perl/Tk on Perl 5, by the way.
I tried to execute my code, but to find this error message:
COUNT 0
Invalid type '-' in pack at pack2.pl line 62.
This is Line 62 in my application:
my $be = $f1->BrowseEntry(-label => "Widget $count:",
-choices => ["right", "left", "top", "bottom"],
-variable => \$packdirs[$count], -browsecmd => \&repack)
-pack(-ipady => 5, -side => 'left');
I don’t see any problem in my code, can anybody help me?
I think this should be
->pack, not-pack. Instead of calling the->pack()method, you’re calling the built-inpackfunction and subtracting the result from->BrowseEntry‘s return value. That’s why you’re getting an error.