>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

Reply via email to