- ... Actually, this is where it starts to get wierd. If I do this: ^$GetDOSOutput( perl -c ^** )$ ^!Open ^$GetAppPath$StdError.err I get a window saying noMessage 1 of 31 , Apr 2, 2001View SourceOn 02/04/2001 at 4:44 AM wheeler54321@... wrote:
>Use ^$GetDosOutput$:Actually, this is where it starts to get wierd. If I do this:
^$GetDOSOutput("perl -c ^**")$
I get a window saying "no dos output" from NoteTab, then StdError.err open with an error by the Perl interpreter saying that it cannot find file "**" (yes, without the ^).
If I do this:
^!Prompt $GetDOSOutput("perl -c ^**")$
I get first a window saying "no dos output" from NoteTab, then an empty prompt, then StdError.err open - with exactly what I am looking for... the output of the syntax check. This is the only method I have found that consistently works, although it is annoying.
Obviously, I don't want *any* console window to popup, and I don't want to have to answer any prompts. I just want to double click the clip and see the result of the syntax check. Which is why I would like to do this:
^$GetOutput("perl -c ^**")$
(I learned something since my orginal post....) but of course, I get the problem I detailed orginally. Half the time NoteTab telling me that it can't find StdError.err and other times output from Perl saying that it cannot find file "^**" (yes, WITH the ^)
- ... Thanks for the memory jog! I experienced the buffering problem when porting PERL scripts from Unix to MS-DOS several years ago (Perl 4, so the details haveMessage 31 of 31 , Apr 5, 2001View SourceAt 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.