Re: [Clip] Re: Problems capturing STDERROR
- Which of the two statements fail. Narrow it down.
----- Original Message -----
From: "Jason Waugh" <jwaugh26@...>
Sent: Monday, April 02, 2001 11:02 AM
Subject: Re: [Clip] Re: Problems capturing STDERROR
> On 02/04/2001 at 4:44 AM wheeler54321@... wrote:
> >^$GetDosOutput("perl -c ^**")$
> >^!Info ^$GetFileText("^$GetAppPath$StdError.err")$
> >I know this work on Win98 SE, I just can't get it to work on WinMe.
> Hmmn. I am trying to do this on Win2000. (With NTPro 4.85)
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
- At 10:20 PM 4/4/01, Jason Waugh wrote:
> >I don't know the intricacies of using ^** you might have a point about it'sThanks for the memory jog!
> >'inconsistency' You would think it would work the same as ^$GetDocName$.
> >Actually I never bother using "^**" and always use ^$GetDocName$
>Well, it's not so much an inconsistency with ^** as it is an inconsistency
>in the way NoteTab and Perl are working together with respect to
>STDERR. Maybe Perl isn't flushing before NoteTab thinks it's done
>capturing STDERR? Maybe the NoteTab parser occasionally chokes on parsing
>^**? This would result in the two different error messages appearing on
>different tries with the same script....
I experienced the buffering problem when porting PERL scripts from Unix to
MS-DOS several years ago (Perl 4, so the details have changed about
avoiding the problem since I wrote those scripts). I recall needing to
either disable buffering, or set it to line buffering (from block
buffering) to make the problem go away.
Find a Perl reference (here's one I have: "Programming Perl", second
edition, by Larry Wall, Tom Christiansen & Randal L. Schwartz, published by
O'Reilly, copyright 1996) and look for information on the "$|"
variable. It allows you to set output filehandles to block buffering
(default) or line buffering (which is needed for Perl with NoteTab, since
it runs as a DOS program).
Hope this is helpful.