Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: tie STDOUT in Tkx

by Anonymous Monk
on Dec 03, 2012 at 10:33 UTC ( #1006841=note: print w/ replies, xml ) Need Help??


in reply to tie STDOUT in Tkx

Sure it is, maybe :)

fail  [cpan://tkx tie], [metacpan://tkx tie], [google://site:perlmonks.org tkx tie stdout]   tkx tie, tkx tie, site:perlmonks.org tkx tie stdout

fail again ?node_id=3989;BIT=tie%20;HIT=Tkx...

use Tie::STDOUT print => sub { $textvariable .= join ''. @_; }
use Tie::STDERR print => sub { $textwidget->insert("end", join ''. @_ ); }

use constant STAPENDER => sub { $textwidget->insert_end( @_ ); };
use Tie::STDOUT print => STAPENDER;
use Tie::STDERR print => STAPENDER;


Comment on Re: tie STDOUT in Tkx
Download Code
Replies are listed 'Best First'.
Re^2: tie STDOUT in Tkx
by ColonelPanic (Friar) on Dec 03, 2012 at 11:19 UTC
    The road to wisdom? -- Well, it's plain and simple to express: Err and err and err again but less and less and less.

    -- Piet Hein

    ;)



    When's the last time you used duct tape on a duct? --Larry Wall
      :) Yup, it should be use Tie::STDERR STAPENDER(); as the two modules aren't by the same author their interface isn't identical

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006841]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2015-07-29 04:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls