Rob Dixon wrote: > John W. Krahn wrote: >> chen li wrote: >> >>> 5) my $mean+=$_/@data [EMAIL PROTECTED]; >> >> That was not posted and it won't work correctly (see the NOTE at the >> end of >> the "Statement Modifiers" section of perlsyn.) > > Ruud posted it in the 'perl built in function for mean' thread at 7:46 > GMT this morning (10 September).
What he *actually* posted was: > "John W. Krahn" schreef: > >>> my$mean=(map$a+=$_/@data,@data)[-1]; > > my$mean;mean+=$_/@data [EMAIL PROTECTED]; > > -- Affijn, Ruud "Gewoon is een tijger." Which declares $mean *before* using it with the for statement modifier which is why I said "That was not posted". John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>