#!/usr/bin/perl -w
use Tk;
use strict;




my $mw = MainWindow->new;


my $frame2 = $mw->Frame(-label => "Frame",-borderwidth => 2, -relief => 'groove');
$frame2->Button(-text => 'Run',-width => 15, -command => sub { hello(); })->pack;
$frame2->pack(-ipadx => 20,-ipady => 20);

#This loop makes that sub hello becomes like an event
MainLoop;



#Event of button
sub hello {
    system('echo "hello world"');

    exit;  #Quit from aplication

}


