note
rdiez
<p> First of all, thanks for your quick answer. </p>
<blockquote>
Perl's maximum values for integers can be determined
</blockquote>
<p> That is brilliant, thanks. </p>
<blockquote>
If you want to work with integers larger than that, use Math::BigInt.
</blockquote>
<p>I do not really want to work with larger integers. I want to allow up to the maximum unsigned integer value in the current Perl. I would rather avoid the overhead of using Math::BigInt if I can. </p>
<blockquote>
To validate number formats, use Regexp::Common::number.
</blockquote>
<p>How are these regular expressions going to help? Say the current Perl uses 32-bit integers. How is a regular expression going to help me accept 4294967295 (UINT32_MAX) but not 4294967296 (UINT32_MAX+1)?</p>
<p>Say Perl automatically "upgrades" UINT64_MAX + 1 to a floating-point value, and the platform uses 64-bit integers but also 64-bit floating point values. Is that not going to lose some precision? How can I then accept exactly up to UINT64_MAX but not UINT64_MAX + 1 ?</p>
11118650
11118652