use Digest::SHA1; my $sessID = sha1(time . rand . $$ . rand . $username . rand . $secretbits);