in reply to Unix password change

You can try to use the IPC::Run module to control the passwd program.