[Israel.pm] Strange "Argument isn't numeric" warning

Jason Elbaum jason.elbaum at gmail.com
Thu May 3 09:52:41 EEST 2007


> "5&6" can't be forced into numeric
> form without being evaluated.

Yes it can. With a numeric-prefixed string, Perl (like atof) takes the
numeric prefix as its value. Hence ("5&6" + 7) == 12.


> As such, since the + operator is expecting
> a number on both sides, we get the warning.

But it gets numbers on both sides: 5 and 7.

Jason



More information about the Perl mailing list