On Sun, Mar 06, 2005 at 02:13:09AM -0700, Luke Palmer wrote:
: What is output:
: 
:     sub foo($x, ?$y, [EMAIL PROTECTED]) {
:         say "x = $x; y = $y; z = @z[]";
:     }
: 
:     my @a = (1,2,3);
:     foo($x, @a);

I think it should say something like:

    Use of undefined value at foo line 2
    x = ; y = 1 2 3; z = 

Optional parameters are greedy, and @a means [EMAIL PROTECTED] in a scalar 
context.

Larry

Reply via email to