From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Spencer Chase Sent: 01 April 2009 01:44 To: perl-win32-users@listserv.ActiveState.com Subject: running a dos program from perl
> Greetings Perl-win32-users, > > I need to run a dos program with parameters about 1500 times with different parameter sets. I have a perl > script that creates batch files with the program call and parameters and these work fine. I am trying to find a > way to automatically run all the batch files. The dos program also requires confirmation from the keyboard 7 > time to run to completion. If I run the program from a batch file I just need to hit "enter" 7 times before the > first one is needed and the program runs to completion so the keystrokes are buffered and used by the program > appropriately. > > Is there any way to run this program from perl and have the perl script supply the 7 required enters? I don't > understand enough about threads and processes to figure out how this might be done. I have tried calling the > batch files using system, backticks and system and can not get even close. I suggest taking a look at 'perldoc perlipc', as well as 'perldoc IPC::Open2' and 'perldoc IPC::Open3'. Installing IPC::Cmd and/or IPC::Run may help simplify things a bit. HTH -- Brian Raven This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs