in reply to Command execution through pipe from Open function
You can try to use open2 or open3 instead. That will keep you in control of the output and see if the password was accepted or rejected.
Casiano