#!/usr/bin/perl use Tk; my $mw = MainWindow->new(); $left_frame = $mw->Frame->pack(qw(-fill both -expand 1)); $bottom_frame = $left_frame->Frame->pack(qw(-side bottom -expand 1 -fill x)); $left_frame->Label(-text => "Perl Chat Client v$VERSION") ->pack(-side => 'top', -anchor => 'nw', ); $status = $left_frame->Text (-width => 40, -height => 30, -wrap => 'word')->pack(qw(-expand 1 -fill both)); $status->tagConfigure(section, -font => '-adobe-helvetica-bold-r-normal--14-140-75-75-p-82-iso8859-1'); $status->bind('', \&pick_word); $bottom_frame->Label(-text => 'Global Message:')->pack(qw(-side left -anchor s)); $gm_quick = $bottom_frame->Entry (-width => 26)->pack(qw(-side left -anchor s -fill x -expand 1)); $gm_quick->bind('', sub { send_msg_all($gm_quick->get()); $gm_quick->delete(0,'end'); } ); MainLoop;