PipTigger has asked for the wisdom of the Perl Monks concerning the following question:
I've printed 16**8 and gotten ~4billion which is 2**32. Are numerics maxed at 4bil unless you use Integer Modules for long text math? I'm using this now which werks fine but It's not as straight forward as the first.my $rndm = sprintf "%lx", int rand(16**8); #why only 4hex digits when num is 8?
Thanks for any insight. TTFN & Shalom.my $rndm = int rand(16**4); my $sess = sprintf "%lx", $rndm; $rndm = int rand(16**4); $sess .= sprintf "%lx", $rndm;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why doesn't this give an 8 character hex number?
by princepawn (Parson) on May 19, 2000 at 22:24 UTC | |
|
RE: Why doesn't this give an 8 character hex number?
by turnstep (Parson) on May 19, 2000 at 22:57 UTC | |
|
RE: Why doesn't this give an 8 character hex number?
by beppu (Hermit) on Jul 07, 2000 at 10:18 UTC |