# Entry Window $init = my $mw = new MainWindow; $label = $mw -> Label(...) # The START button: my $button = $mw -> Button(...,-command=>\push_button); sub push_button { my $mw = new MainWindow; $mw -> geometry ("1200x600"); # Menu bar $mw->configure(-menu => my $menubar = $mw->Menu, -background => 'white'); my $file = $menubar->cascade(-label => '~File'); my $edit = $menubar->cascade(-label => '~Edit'); my $help = $menubar->cascade(-label => '~Help'); my $open; $mw-> Button (-text =>'Open', -command =>\&open_file)->place(-x=>240, -y=>35); $mw-> Button (-text =>'Get Statistics', -command =>\&get_statistics)->place(-x=>320, -y=>35); MainLoop; sub open_file {$open = $mw->getOpenFile( -filetypes => $types_OPEN, -defaultextension => '.sff'); $te->Load( "$open");} sub get_statistics { my $fastafile= $open; print STDERR "selected file: $fastafile\n"; }; $te = $mw->Scrolled( .....); }