in reply to Re^3: trouble taking reference of function
in thread trouble taking reference of function

The argument to sin is in scalar context (it has a prototype of "_").

Replies are listed 'Best First'.
Re^5: trouble taking reference of function
by Lawliet (Curate) on Mar 03, 2009 at 22:36 UTC

    Oh, so it returns the sine of the number of elements passed to the function, right?

    And you didn't even know bears could type.

      You could say that, but I think it's more accurate to say that the function doesn't receive any more than one element. The array in sin(@_) is evaluated in a scalar context. Its value in that context is the number of elements in the array, and that single value is given to sin.