in reply to Re^3: Fake JAPH
in thread Fake JAPH
Indeed Perl does magic dwimmeries with automatic conversions between numerical and string values depending on how these are used, but what I meant is that only to a very limited extent there does exist a well-definite concept of "string (or numerical) context" comparable to, say, "scalar (or list) context". As an example, quoting from 'perldoc perlvar':What I'd like to stress is that in Perl (5, that is!) there's hardly anything like a *string* contextActually, there is, and lots and lots of it. Perl could not do automatical transformation between numerical values and string values if it wasn't for string context:
$! If used numerically, yields the current value of the C "errno"
variable, or in other words, if a system or library call fails,
it sets this variable. This means that the value of $! is
meaningful only immediately after a failure:
As you can see, it consistently avoids speaking of "numerical context". Incidentally my stress on Perl5 was due to the fact that Perl6 is supposed to have such contexts instead (and to support them unambiguously!)
Also compare e.g. http://www.google.it/search?q=%22string+context%22+site:perldoc.com
with http://www.google.it/search?q=%22scalar+context%22+site:perldoc.com
|
|---|