sub InProduct(){ my($a, $b) = @_; return $a->X*$b->X+$a->Y*$b->Y+$a->Z*$b->Z}
A side note: The InProduct() function is defined with a prototype that specifies an empty argument list, but the function only makes sense if it's called with two arguments. You are obviously calling the function in a way that defeats prototype checking; don't bother with prototypes in such cases — or in most other cases. See also Far More than Everything You've Ever Wanted to Know about Prototypes in Perl -- by Tom Christiansen.
Give a man a fish: <%-{-{-{-<
In reply to Re: about the application of arrow operator
by AnomalousMonk
in thread about the application of arrow operator
by windcrazy86
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |