Gossamer Forum
Home : General : Perl Programming :

Perl Tk, redirect write(); to text widget

Quote Reply
Perl Tk, redirect write(); to text widget
I am trying to port some perl code to perl/tk and was wondering if it is possible to redirect the output from a write call (printing a format) to a text widget. I have read several posts but have yet to discover a solution that works. Any help would be appreciated. Below is an example of what I am trying to accomplish:

format MONTH =
GPS @|| GPS @||
$month[$m], $month[$m]
Week Sun Mon Tue Wed Thu Fri Sat Week Sun Mon Tue Wed Thu Fri Sat
---- --- --- --- --- --- --- --- ---- --- --- --- --- --- --- ---

.

.some code

.



$~ = Month;

write;



Is is possible to send the output of this write to a tk text widget



I am new to tk and would love any comment or suggestions that you might have.

-Tony