Perl converts between the various subtypes as needed, so you can treat a number as a string or a string as a number, and Perl will do the Right Thing. To convert from string to number, Perl internally uses something like the C library's atof(3) function.
Of course, that assumes that you are familiar with the atof function, which is described in the manpage as
double atof(const char *nptr);The atof() function converts the initial portion of the string pointed to by nptr to double.
I have to recognize that the PHP documentation is more explicit in this regard; see for example http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion
In reply to Re: Is '2x' + '3y' == 5 documented?
by itub
in thread Is '2x' + '3y' == 5 documented?
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |