Hi All,
I'm wondering if anyone has seen a good example of this out there somewhere.
I am calling a program from within a PERL script using a system call:
system ( "run_program 1>LOGFILE" )
The program writes entries to the logfile, and takes about 5 min or so.
What I want to do is have a display window in the Perl "form" which scrolls the logfile, as info is being dropped in there.
Right now I can dump the logfile to a window, but it isn't "live":
################################################
### This subroutine creates a scrolled window
### which displays the contents of the
### releaseLOG file.
###
### Usage: '&show_log'
###---------------------------------------------
sub show_log
{
open FILE, "${batch_script_directory}LOGFILE" || die "release: ?Can't open the log for reading. $!";
while (<FILE>)
{
chomp;
my $logfile_l = $title_b-> Label (
-text=> $_,
-font => "{Arial} 11 {bold}",
-foreground=> 'black',
-height=> 1,
-width=> 5,
-relief=> 'ridge',
)-> pack (
-side=> 'left',
);
}
#
#
MainLoop;
#
#$logfile_l-> destroy();
#
}
I'm wondering if anyone has seen a good example of this out there somewhere.
I am calling a program from within a PERL script using a system call:
system ( "run_program 1>LOGFILE" )
The program writes entries to the logfile, and takes about 5 min or so.
What I want to do is have a display window in the Perl "form" which scrolls the logfile, as info is being dropped in there.
Right now I can dump the logfile to a window, but it isn't "live":
################################################
### This subroutine creates a scrolled window
### which displays the contents of the
### releaseLOG file.
###
### Usage: '&show_log'
###---------------------------------------------
sub show_log
{
open FILE, "${batch_script_directory}LOGFILE" || die "release: ?Can't open the log for reading. $!";
while (<FILE>)
{
chomp;
my $logfile_l = $title_b-> Label (
-text=> $_,
-font => "{Arial} 11 {bold}",
-foreground=> 'black',
-height=> 1,
-width=> 5,
-relief=> 'ridge',
)-> pack (
-side=> 'left',
);
}
#
#
MainLoop;
#
#$logfile_l-> destroy();
#
}