use strict; use warnings; use Tk; my $mw = new MainWindow; $mw->geometry ("400x400"); my $tf = $mw->Frame->pack ( -side => "top", -expand => 0, -fill => "x", ); my $label = $tf->Label ( -text => "File?", -anchor => "w", )->pack ( -side => "left", -anchor => "w", -padx => 20, -pady => 10, ); my $entry = $tf->Entry->pack ( -side => "left", -anchor => "w", -padx => 20, -pady => 10, ); my $button = $tf->Button ( -text => "search!", -width => 30, )->pack ( -side => "right", -anchor => "e", -padx => 20, -pady => 10, ); my $text = $mw->Text ( -width => 15, -height => 3, )->pack ( -side => "top", -anchor => "nw", -padx => 20, -pady => 10, -expand => 1, -fill => "both", ); MainLoop;