Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: trouble taking reference of function

by Lawliet (Curate)
on Mar 03, 2009 at 22:00 UTC ( #747914=note: print w/replies, xml ) Need Help??


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

Huh? Why does that happen?

And you didn't even know bears could type.

  • Comment on Re^3: trouble taking reference of function

Replies are listed 'Best First'.
Re^4: trouble taking reference of function
by kyle (Abbot) on Mar 03, 2009 at 22:17 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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://747914]
help
Chatterbox?
erix just did a 12 km-run. Slow, but unstoppable!
[choroba]: My recent record is 10km in 1 hour :)
[perldigious]: Nice erix... perldigious' legs are so sore from portaging his kayak from place to place last weekend he can barely hobble 12m. :-)
[erix]: you're faster than me then :)
[erix]: well, at the moment, that is :)

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2017-05-24 12:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?