>>>>> "Chaim" == Chaim Frenkel <[EMAIL PROTECTED]> writes:

Chaim> I don't find this meaningful:

Chaim>  sub foo() {  return (1,7) }
Chaim>  $x = &foo();            # $x == 7;

I do.  It's perfectly consistent.

  $x = SUBROUTINE CALL
  ...
  SUBROUTINE CALL = (1,7)

You just factor out the subroutine call there.  It's the same
as

  $x = (1,7) # $x is 7

I've never gotten why you don't get that. :) It's a very simple rule:
the return context is the context of the invocation, and is determined
at runtime as well as being detectable at runtime (see wantarray()) if
you want to do something special.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to