#usr/bin/perl -w use Tk; $mw = MainWindow->new(); $mw->title ("mkFast-A"); $msgi = $mw->Label (-text => 'Making Easy things Easy', -relief => 'groove'); $msgi->pack(-side=>'top'); $button = $mw -> Button(-text=> '+', -command =>\&makeline); $button->pack(-side=>'bottom', -anchor=>'w'); $but = $mw ->Button(-text=>'hash', -command =>\&print_hash); $but->pack(-side => 'bottom', -anchor =>'e'); $but2 =$mw ->Button(-text=>'print', -command =>\&print_seq); $but2->pack(-side => 'bottom', -anchor =>'e'); $x = $$a; $y = $$b; $hash{$x} = $y; print (($x, $y) = each %hash); MainLoop(); sub makeline{ my $i; my $j; my $Seqname = $mw-> Scrolled ('Entry', -scrollbars =>'os'); $Seqname->pack(-side=> 'left'); $i = $Seqname->get(); my $Sequence = $mw -> Scrolled ('Entry', -scrollbars =>'os'); $Sequence->pack(-side=>'right'); $j = $Sequence->get(); $a=\$i; $b=\$j; return $a; return $b; } sub print_hash{ while (($key, $value) = each %hash){ print "$key => $value\n"; } } sub print_seq{ print "$i"; }