[Israel.pm] Strange "Argument isn't numeric" warning
Jason Elbaum
jason.elbaum at gmail.com
Thu May 3 07:53:32 EEST 2007
> Since you quoted it, it's a string. However, since it is used
> in numeric context (because of +), Perl tries to convert it
> to number.
Which is fine.
> Perl conversion work very similar to atof(3) [maybe it even use it, didn't
> bother to check]. It convert the numeric content of the string and stops
> conversion when it hits non-numeric characters.
Also fine.
> That's why "5&6" is converted to 5 in numeric context. And for the
> same reason the string "hello" is converted to 0 (conversion stops
> right at the beginning of the string).
Still fine.
> Hope it is clear now.
No - you haven't explained why I get a "non-numeric" warning.
Jason
More information about the Perl
mailing list