in reply to How to control input of an external program?

If you use WWW::Curl, you'll want to read the tutorial for libcurl. I just looked over the tutorial, and I see three easy ways to do passwords:

protocol://user:password@example.com/path/

This appears to be the standard method for giving the password. You could also do:

curl_easy_setopt(easyhandle, CURLOPT_USERPWD, "myname:thesecret");

or

curl_easy_setopt(easyhandle, CURLOPT_PROXYUSERPWD, "myname:thesecret");