Hello Tk and Perl afficianados,
I'm tie-ing a filehandle to a Tk::Text widget
printing some lines and then...
I would like to clean up and close my filehandle. (Silly me trying to keep
things clean)
Unfortunately by doing the tie I've associated the Text widget to the
filehandle and when I try to close
the filehandle I get the error
"Can't Locate auto/Tk/Text/CLOSE.al in @INC..."
As I write this I wonder if my answer could be as simple as untie-ing the
filehandle...?
Or do I even need to clean up?
Your thoughts are appreciated.
I'm running Perl v5.8.7 for sun4-solaris
Here is my sample code
#!/usr/bin/perl
#use strict
use Tk;
use FileHandle;
my $mw = MainWindow->new();
my $text = $mw->Text(qw/ -width 40 -height 10/)->pack;
my $FH = new FileHandle("> stuff.txt");
tie *$FH, ref $text, $text;
$FH->print(" How ya doin'\n");
$FH->close(); # comment this out to make it work
MainLoop;
__END__
Regards,
Gary Trosper
RTSC
_______________________________________________
Perl-Unix-Users mailing list
Perl-Unix-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs