getOpenFile -- empty box remains



Using WindowsXP SP3, Perl 5.89, Tk 804.027

After running the following script, a small empty box of about 2"x2" remains on the screen (behind the text-box) and has to be deleted manually. What can I do to make this small box disappear?
($infile is a short plain text file)

Fred


#!/usr/local/bin/perl
use strict ;
use warnings ;
use Tk ;
my $main = MainWindow->new;
my $text ;
my $infile = $main->getOpenFile(-title=>'Input File' );

open (my $IN, "< $infile") or die"Can't open $infile\n";
{ local $/ = undef; $text = <$IN> }
close ($IN);
# do my stuff with $text ...
$main = MainWindow->new (-title => 'Analysis of a HTML-file' );
$main->Label(-text => $text, -width =>100, -height => 20,
-font => ['arial', 10, 'bold'], -justify => 'left' ) -> pack;
$main->Button (-text => 'Quit', -font => ['arial', 10, 'bold'],
-width =>12, -height => 1.5, -command => [$main => 'destroy']
)->pack;
MainLoop;
.



Relevant Pages

  • Newbie Question...
    ... The script I have so far is... ... the second output file is empty and perl ... using the system dir/b/s command, and should I store the output ...
    (comp.lang.perl.misc)
  • Re: Strategy for diagnosing context-sensitive bug
    ... Are you familiar with the perl debugger? ... I would like to see the Perl source to be able to be more helpful ... The current script where the error occurs is at ... I mean if a few empty lines can ...
    (perl.beginners)
  • RE: a sed equivelent
    ... > I'm just beginning to work with sed in shell scripts I was ... > wondering if anyone has a simmilar script in perl they can send my ... > way or what the perl equivelent of the sed /s would be. ... > leaving it empty. ...
    (perl.beginners)
  • 2005-11-20 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)
  • 2005-11-20 [de.comp.lang.perl.cgi] FAQ
    ... Programmiersprache Perl in CGI-Scripten. ... Wo gibt es Dokumentation über Perl und CGI? ... Hilfe zum Programm perldoc kann man mit 'perldoc perldoc' ... Mein Script läuft nicht bei meinem Provider. ...
    (de.comp.lang.perl.cgi)