in reply to Algoritm for converting string to number?
I do not think this is a good idea—you got some already—but it does fulfill the letter of the request. :P
use Math::BigInt; use Digest::SHA "sha1_hex"; my $string = shift || die "Give a string!\n"; print Math::BigInt->new( "0x" . sha1_hex($string) ), $/; __END__ "mabye a db would be better" -> 1118343603570750339537815681476550431532447928026
|
|---|