in reply to Re: Re: Multiplying together the numers in an array
in thread Multiplying together the numers in an array

To be completely honest, *= is just a short hand for

$total = $total * $_;
It is a holdover from C and is actually pretty useful as shorthand.

Replies are listed 'Best First'.
Re: Re: Re: Re: Multiplying together the numers in an array
by Anomynous Monk (Scribe) on Apr 09, 2004 at 19:39 UTC
    Yes, I understand what *= does; the point is that reduce { $a *= $b } produces the same result as reduce { $a * $b } and the latter expresses the intention better (but the former is faster).