#package gui_test; use strict; use warnings; use Win32::GUI; display_gui(); exit; sub btnCancel_Click {-1;} sub Main_Terminate {-1;} sub display_gui { my $main = Win32::GUI::DialogBox ->new( -name => "Main", -text => "GUI Test", -width => 200, -height => 200, -top => 200, -left => 200, ); my $btn_cancel = $main->AddButton( -name => "btnCancel", -cancel => 1, -text => "Cancel", -left => 100, -top => 100, ); $main->Show(); Win32::GUI::Dialog(); }