>AFAICT we could make it a syntax error iff foo is not used in void context;
>Perl must be able to tell whether or not it is used in order to know what
>context the result is in, right?
Well, that depends. Often you must delay till run-time. When Perl
simply sees something like:
sub fn { return @blah }
it can't know whether you'll use that as:
$x = fn();
or
@x = fn();
or
fn();
Furthermore, if the latter is at the end of a do{}, eval{}, or sub{}
(SEE! I *told* you there were similar!!), then you still don't know
the context, as it's dynamically determined.
--tom
- Re: The distinction between "do BL... Christopher J. Madsen
- Re: The distinction between "do BL... Jonathan Scott Duff
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Christopher J. Madsen
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Christopher J. Madsen
- do BLOCK as inline sub? (was Re: "... Uri Guttman
- Re: The distinction between "do BLOCK while CON... Peter Scott
- Re: The distinction between "do BLOCK whil... Christopher J. Madsen
- Re: The distinction between "do BLOCK ... Peter Scott
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Chaim Frenkel
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Chaim Frenkel
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Chaim Frenkel
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Chaim Frenkel
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Chaim Frenkel
- Re: The distinction between "do BL... Tom Christiansen
