system qq {echo -e "$newpassword\n$newpassword" | passwd $username}
I explained the issues with running external commands like this in my node here. In this case, hippo has a good point about using existing modules, but if you absolutely must run an external command, in this case I might suggest IPC::Run3, as it allows you to avoid the shell and feed the external command some STDIN.
In reply to Re: Selecting Password
by haukex
in thread Selecting Password
by cbtshare
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |