# change my $crypted = crypt($string,$salt); # to my $crypted = `perl -e "print crypt($string,$salt)"`;