http://www.perlmonks.org?node_id=215217


in reply to Infinity recognized as number

Thanks all. The point is, Perl prints out the Infinity number as "Inf" (FreeBSD) or "inf" (linux). What I learned is that the string "Inf" is just a string.

Now I'm using $inf=10**10**10

Replies are listed 'Best First'.
Re^2: Infinity recognized as number
by Anonymous Monk on Mar 24, 2013 at 22:37 UTC
    FWIW, perl 5.16.1 :)
    $ perl -e " print 1 + Infinity " 1.#INF $ perl -e " print 1 + inf" 1.#INF $ perl -e " print int inf" 1.#INF $