$ perl -wE 'say 0 + "1.2"' 1.2 $ perl -wE 'say 0 + "1.2.3"' Argument "1.2.3" isn't numeric in addition (+) at -e line 1. 1.2