On 2 Oct 2007 at 15:23, Rob Dixon wrote: > Hi Dermot. You're a little confused, but you're not far out!
Your being kind. > > > > $| = 1; I wasn't aware this only applied to STDOUT. My log messages all appear at once, when the script has exited and I was hoping for some 'realtime' messages. > No need to autoflush. > > > our $log; > > There is no need to declare the $log variable with 'our' here (or to > 'use vars' above): a 'my' variable will do the job fine. Noted. I can have a package variable. > > my $logpath = 'mylog.txt'; > > open($log,">>$logpath") or die "Can't append to $logpath: $!\n"; > > open my $log, '>>', $logpath or die "Can't append to $logpath: $!"; > > mysub(); The killer. > HTH, Sure did. Sorry for not spending a bit longer experimenting before I sent the mail. Dp. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/