XP is just a number | |
PerlMonks |
Re^6: trouble taking reference of functionby kyle (Abbot) |
on Mar 03, 2009 at 22:42 UTC ( [id://747927]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|