Thanks zentara! Worked to perfection....Here is my code that tails three separate files using the tabs....Cheers!
use Tk; use Tk::NoteBook; use IO::Handle; my $S=IO::Handle->new; my $D=IO::Handle->new; my $E=IO::Handle->new; my $baseDir = "/"; my $sumFile = $baseDir."summary.log"; my $detFile = $baseDir."detail.log"; my $errFile = $baseDir."error.log"; open($S,"tail -f $sumFile |") or die $!; open($D,"tail -f $detFile |") or die $!; open($E,"tail -f $errFile |") or die $!; $mw = MainWindow->new(); $mw->geometry( "600x200" ); $book = $mw->NoteBook()->pack( -fill=>'both', -expand=>1 ); my $sumTab = $book->add( "Sheet 1", -bitmap => 'info'); my $detTab = $book->add( "Sheet 2", -bitmap => 'questhead'); my $errTab = $book->add( "Sheet 3", -bitmap => 'error'); my $sumText = $sumTab->Scrolled('Text', -wrap=>'none')->pack(-expand=> +1); my $detText = $detTab->Scrolled('Text', -wrap=>'none')->pack(-expand=> +1); my $errText = $errTab->Scrolled('Text', -wrap=>'none')->pack(-expand=> +1); $sumText->fileevent(\*$S,'readable',[\&fillSummary,$sumText]); $detText->fileevent(\*$D,'readable',[\&fillDetails,$detText]); $errText->fileevent(\*$E,'readable',[\&fillErrors,$errText]); MainLoop; sub fillSummary { my ($w) = @_; my $text = <$S>; $w->insert('end',$text); $w->yview('end'); } sub fillDetails { my ($w) = @_; my $text = <$D>; $w->insert('end',$text); $w->yview('end'); } sub fillErrors { my ($w) = @_; my $text = <$E>; $w->insert('end',$text); $w->yview('end'); }

In reply to Re^4: Perl:TK - tail -f to text widget by rehmanz
in thread Perl:TK - standard output to text widget by crabbdean

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.