My suggestion:

my $output;  # possibly declare this globally further up...
>   my $infile="/Documents and Settings/Kevin/Desktop/Stuff/Perl/samplegui2.pl";
$output.="Processing infile...";
$textfield->Text($output);
>   open INFILE, "<$infile" or die "open infile error: $! File: $infile";
>   my $linenr = 0;
>   foreach my $line (<INFILE>) {
>      chop $line;
$ouput.="$line\r\n";
$textfield->Text($output);
>      print "$line\n";
> 
>     Win32::GUI::DoEvents() >= 0 or die "Window was closed during processing";
>     sleep 1;  #body of the loop...
>   }
> 
$output.="completed";
$textfield->Text($output);
>   Win32::GUI::DoEvents();
>   sleep 1;    #program continues...

Darrik

Reply via email to