Hi I tried that I am still not able to run it. Here's what I did. I am using active perl 5.14 Thanks
use strict; use Tkx; use constant TRUE => 1; use constant FALSE => 0; #Defining UI components. our $iteration = 0; our $mw = Tkx::widget->new("."); $mw->g_wm_title("G7 Fiery."); $mw->g_wm_minsize(300, 300); #our $filename = Tkx::tk__getOpenFile(); our $frame = $mw->new_ttk__frame( -padding => "3 3 12 12"); our $label1 = $mw->new_ttk__label(-text => "Iteration"); our $label2 = $mw->new_ttk__label(-textvariable => \$iteration); our $cb = $frame->new_ttk__button(-text => "Calculate", -command => su +b {calculate();}); our $cb1 = $frame->new_ttk__button(-text => "open", -command => sub {g +et_source_filename();}); #Placing objects . $frame->g_grid(-column => 0, -row => 0, -sticky => "nwes"); $cb->g_grid(-column => 3, -row => 3, -sticky => "w"); $cb1->g_grid(-column => 2, -row => 3, -sticky => "e"); $label1->g_grid(-column => 2, -row => 1, -sticky => "w"); $label2->g_grid(-column => 3, -row => 1, -sticky => "w"); $mw->g_grid_columnconfigure(0, -weight => 1); $mw->g_grid_rowconfigure(0, -weight => 1); foreach (Tkx::SplitList($frame->g_winfo_children)) { Tkx::grid_configure($_, -padx => 5, -pady => 5); } sub calculate() { $iteration ++; } sub get_source_filename { $source_file = Tkx::tk___getOpenFile(); } Tkx::MainLoop;

In reply to Re^2: Open a file using Tkx package by bugged123
in thread Open a file using Tkx package by bugged123

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.