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


in reply to Incrementing "Infinity" bug

G'day Rolf,

"tested in 5.10

could someone plz test in newer versions and reply?"

Same result in 5.14.2:

$ perl -e '$a=inf; print ++$a,"\n"' ing $ perl -v This is perl 5, version 14, subversion 2 (v5.14.2) built for darwin-th +read-multi-2level

As you were probably aware, warnings alert you and strictures disallow it altogether:

$ perl -Mwarnings -e '$a=inf; print ++$a,"\n"' Unquoted string "inf" may clash with future reserved word at -e line 1 +. ing $ perl -Mstrict -e '$a=inf; print ++$a,"\n"' Bareword "inf" not allowed while "strict subs" in use at -e line 1. Execution of -e aborted due to compilation errors.

-- Ken