<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 2007/04/09, at 15:57, Patty Silva wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Pessoal.. tem como eu somar elementos numericos de um array?<BR>ex:<BR>@teste=(1,2,4,1,3,1,1,1,4,56,7,8,9);<BR>somar=1+2+4+1+3....<BR></BLOCKQUOTE><BR></DIV><DIV>&lt;code&gt;</DIV><DIV>use List::Util qw(sum);</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>my $resultado = sum(@teste);</DIV><DIV>&lt;/code&gt;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Lucida Grande; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>--</DIV><DIV>Igor Sutton</DIV><DIV><A href="mailto:igor.sutton@gmail.com">igor.sutton@gmail.com</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>