Thx for all the replies. I am still getting same error after multiple reinstall.
Previous code i posted was from my work so i could not post whole code.
I am posting a new full code, where i am getting same error.
use strict;
use warnings;
use Tk;
require Tk::BrowseEntry;
my @items = qw(check0 check1 check2);
my $mw = MainWindow->new();
my $default_choice = "check0";
my $dropDown = $mw->BrowseEntry(
-label=>'item list',
-variable=>\$default_choice,
-browsecmd=>\&run
)->pack();
$dropDown->insert('end', "check0");
$dropDown->insert('end',"check1");
$dropDown->insert('end',"check2");
$mw->Button(-text=>'exit', -command=>sub{exit;})->pack();
MainLoop;
sub run{
my $x = 0;
foreach my $element (@items){
print $element eq lc($default_choice)? "$default_choice index
+[$x]\n" : next;
$x++;
}
}
Please let me know if i can get that missing labelPack.al and just copy\paste it in my directory
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|