Use chpasswd instead of calling perl.