$salt = join '', ('.', '/', 0..9, 'A'..'Z', 'a'..'z') [rand 64, rand 64]; # create random two-character salt $passhash = crypt($password, $salt); # hash the password with the salt