how to get a md5sum in perl

hi All:
i write a adduser script in perl , but I don't know how to deal with the password , for it stored as md5. and i don't use the shell
command passwd. give me some advice...thanks

use Digest::MD5;

Details here