There's more than one way to do things | |
PerlMonks |
Getting VB To talk to Perlby demerphq (Chancellor) |
on Jul 23, 2003 at 11:15 UTC ( [id://277101]=perlquestion: print w/replies, xml ) | Need Help?? |
demerphq has asked for the wisdom of the Perl Monks concerning the following question: Hi All, Apologies straight off for what is essentially a VB question, but answering the question will make dealing VB code from Perl a lot easier for me, and as I have to do theis somewhat often I really would appreciate some consideration on it by you folks. As we all know controlling external apps from Perl is easy and makes it possible to use Perl as glue. The normal and simplest means of having the processes communicate is over STDIN/STDOUT. What my problem is that it seems to be a real bitch to get VB to write to STDOUT in a useful way. Weve worked the following code out from a MS kb article
And it works. Sortof. If I compile the VB and then run it from the console it appears not to work. However if I pipe it to a file it works fine.
So Perl can read it etc, but its somewhat annoying to have to test it like this. Not everybody will realize that it must be piped to something more intelligent. (ha! more.exe considered more intelligent than VB). If anyone can explain this strange behaviour or tell me what to do to have it behave as expected then Id be much obliged. BTW, my conscience is clear for asking this question as the above code will almost certainly come in useful for someone wanting to wrap some VB app in a perl script.... Ok, ok, its not that clear. Its VB, and it makes me feel dirty too. :-) --- demerphq <Elian> And I do take a kind of perverse pleasure in having an OO assembly language...
Back to
Seekers of Perl Wisdom
|
|