Eriksson,Magnus wrote:
> Hi all!
>
> I'm having a slight problem using the system() function in
> ActivePerl (I'm using ActivePerl 5.8)
>
> Example:
> system("app.exe","parameter1","parameter2");
>
> This works fine executing app.exe with parameter1 &
> parameter2. The problem I have is that app.exe requires
> additional user input in form of a password to run the
> requested action. I would like my perl script to supply this
> password as well as the parameters, not prompting the user
> for the password.
>
> Is this possible? How do I go about doing this?
If you can't supply the password on the command line, but must wait for
a prompt, you then need to control both the stdin and stdout of the
process (assuming that it uses them for user i/o).
See 'perldoc IPC::Open2' or perhaps 'perldoc IPC::Open3'.
HTH
--
Brian Raven
-----------------------------------------------------------------------
The information contained in this e-mail is confidential and solely
for the intended addressee(s). Unauthorised reproduction, disclosure,
modification, and/or distribution of this email may be unlawful. If you
have received this email in error, please notify the sender immediately
and delete it from your system. The views expressed in this message
do not necessarily reflect those of LIFFE Holdings Plc or any of its subsidiary
companies.
-----------------------------------------------------------------------
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs