windcrazy86 has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I have a question about the arrow operator, I understand the definition of ->, but I didn't know how to interpret "return $a->X*$b->X+$a->Y*$b->Y+$a->Z*$b->Z" in following code.
sub InProduct(){ my($a, $b) = @_; return $a->X*$b->X+$a->Y*$b->Y+$a->Z*$b->Z}
Thanks!
Have a good day.
Winston
2017-08-29 Athanasius added code and paragraph tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: about the application of arrow operator
by roboticus (Chancellor) on Aug 29, 2017 at 00:04 UTC | |
by windcrazy86 (Novice) on Aug 29, 2017 at 16:42 UTC | |
|
Re: about the application of arrow operator
by kcott (Archbishop) on Aug 29, 2017 at 04:38 UTC | |
|
Re: about the application of arrow operator
by LanX (Saint) on Aug 29, 2017 at 00:07 UTC | |
|
Re: about the application of arrow operator
by AnomalousMonk (Archbishop) on Aug 29, 2017 at 03:41 UTC | |
|
Re: about the application of arrow operator
by 1nickt (Canon) on Aug 29, 2017 at 00:05 UTC | |
|
Re: about the application of arrow operator
by stevieb (Canon) on Aug 29, 2017 at 00:50 UTC | |
|
Re: about the application of arrow operator
by Anonymous Monk on Aug 29, 2017 at 12:33 UTC |