RE: Executable program from perl script
No Actually i am trying to send the command to this application through script only. -Original Message- From: Josue Garayua [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 07, 2002 3:45 PM To: Sisyphus Cc: [EMAIL PROTECTED] Subject: Re: Executable program from perl script What if the input is via cgi using post and get method? It's posible? J.G.T - Original Message - From: Sisyphus [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, May 07, 2002 12:25 AM Subject: Re: Executable program from perl script - Original Message - From: Sushil Kumar Gupta [EMAIL PROTECTED] To: 'Sisyphus' [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, May 06, 2002 3:39 PM Subject: RE: Executable program from perl script Thanks for the reply ! but how can i give inputs to the exe using the way you have suggested ? How are you supplying input ? If it's via command line arguments, let's say 'arg1' and 'arg2' then it would be worth trying: $out = `d:/abacus/bin/acld.exe arg1 arg2`; If it's via the keyboard, then maybe all you need is: system(d:/abacus/bin/acld.exe); We probably need a little more info about what you want in regard to both input and output. Cheers, Rob ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs msg12981/bin0.bin Description: application/ms-tnef
RE: Executable program from perl script
Thanks for suggesting this but seems this is not working .. i tried it still send start to the STDOUT and not to the application. Actually i want sort of what EXPECT can do , in PERL Regards, Sushil -Original Message- From: $Bill Luebkert [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 3:23 AM To: Sushil Kumar Gupta Cc: '[EMAIL PROTECTED]' Subject: Re: Executable program from perl script Sushil Kumar Gupta wrote: No it's not the command line argument that we can provide to the application. Okay let me give some details about the application. when i start acld.exe it starts one seperate GUI and then wait for commands. when i say start on the command prompt, it will do something when i say stop on the command prompt, it will do something when i say version on the command prompt, it will give me the version of the application. etc etc etc i hope now my intent is clear. Then you probably want a pipe: open PIPE | /path/acld.exe or die ... print PIPE start\n; Or similar. -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /-- o // // http://dbecoll.tripod.com/ (Free site for Perl) -/-' /___/__/_/_ Castle of Medieval Myth Magic http://www.todbe.com/ msg12982/bin0.bin Description: application/ms-tnef
Re: Executable program from perl script
Sushil Kumar Gupta wrote: Thanks for suggesting this but seems this is not working .. i tried it still send start to the STDOUT and not to the application. Actually i want sort of what EXPECT can do , in PERL No it didn't if you coded it right. Provide a samll test snippet and any output/errors you get when you run it. -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /-- o // // http://dbecoll.tripod.com/ (Free site for Perl) -/-' /___/__/_/_ Castle of Medieval Myth Magic http://www.todbe.com/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Executable program from perl script
If you are certain that the acld.exe accepts input from stdin (as opposed to actually reading directly from the console, or creating a GUI input stream, etc), you might try looking at IPC::Open2. This will allow you to read and write from and to the stdout and stdin of the program. Make sure you read the docs, because there are some issues with this module that could cause deadlock. There may also be an expect module on CPAN (at least, IPC::Open2 references it)... HTH, Ricky -Original Message- From: Sushil Kumar Gupta [mailto:[EMAIL PROTECTED]] Sent: Tuesday 07 May 2002 6:17 AM To: '$Bill Luebkert' Cc: '[EMAIL PROTECTED]' Subject: RE: Executable program from perl script Thanks for suggesting this but seems this is not working .. i tried it still send start to the STDOUT and not to the application. Actually i want sort of what EXPECT can do , in PERL Regards, Sushil -Original Message- From: $Bill Luebkert [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 07, 2002 3:23 AM To: Sushil Kumar Gupta Cc: '[EMAIL PROTECTED]' Subject: Re: Executable program from perl script Sushil Kumar Gupta wrote: No it's not the command line argument that we can provide to the application. Okay let me give some details about the application. when i start acld.exe it starts one seperate GUI and then wait for commands. when i say start on the command prompt, it will do something when i say stop on the command prompt, it will do something when i say version on the command prompt, it will give me the version of the application. etc etc etc i hope now my intent is clear. Then you probably want a pipe: open PIPE | /path/acld.exe or die ... print PIPE start\n; Or similar. -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / )// // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /-- o // // http://dbecoll.tripod.com/ (Free site for Perl) -/-' /___/__/_/_ Castle of Medieval Myth Magic http://www.todbe.com/ ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs