0+
bit more idiomatic. It is commonly used to highlight the components of double characters.
$ perl -E' system({ "nonexistant" } "nonexistant"); say 0+$!, ": ", $!; ' 2: No such file or directory
It looks weird because it is not what you usually need to do. A number is a number, regardless of whether it is stored as PV, IV, UV, or NV. Forcing it to save as NV (float) should not be necessary, and it usually indicates an erroneous design elsewhere.
source share