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