The purpose of the program was to demonstrate that passwd doesn't even prompt you via stderr for a password. Either old or new. I'm considering using expect rather than doing it this way however if passwd doesn't provide any prompts I suspect expect will have similar difficulties.
FYI... the full program I've built does provide a couple of routines asking for old/new password. Once I have it working properly I hope to make it available so people would know how to do this in Perl.