note
ikegami
<blockquote><p><i>Range iterator outside integer range</i></blockquote>
<p>Infinity is a float, and the range operator requires an integer. Both of the following would get you the max int:
<c>
use constant MAX_INT => unpack('J', pack('j', -1));
use constant MAX_INT => 0+sprintf('%u', -1);
</c>
<p>You could also use a C-style loop:
<c>
for (my $_ = 1; ; ++$_)
</c>
<blockquote><p><i>I tried to define a lazy iteration and I know that I can redefine the constant for my needs</i></blockquote>
<p>It's not a symbol (i.e., not a constant, a sub or a builtin).
<c>
$ perl -e'Inf()'
Undefined subroutine &main::Inf called at -e line 1.
$ perl -Mstrict -e'Inf'
Bareword "Inf" not allowed while "strict subs" in use at -e line 1.
Execution of -e aborted due to compilation errors.
</c>
<p>It's just a string that some underlying C libraries numify to a value representing infinity.
<blockquote><p><i>It seems to be a feature of Math::BigInt</i></blockquote>
<p>It's an feature of the [http://en.wikipedia.org/wiki/Single_precision_floating-point_format|hardware] floating point number format. Math::Big* may also support it, but that's unrelated.
858188
858188