[Cascavel-pm] Soma

Igor Sutton igor.sutton em gmail.com
Segunda Julho 10 10:11:18 PDT 2006


Thomas,

perl -MList::Util -le 'print List::Util::sum(split(":", "1:2:3"))'

On 7/10/06, Thomas Britis <thomas em tcnet.com.br> wrote:
>
> Senhores,
>
>         Existe alguma forma de se fazer o seguinte:
> $c = "2:3";
>
> ($a, $b) += split (/:/, $c); ???
>
>         Quero somar o resultado do split em variáveis distintas.
> Hoje faço:
> ($x, $y) = split (/:/, $c); $a += $x; $b += $y;
>
>         Obrigado.
> --
> Thomas Storino Britis
> TCNet Informatica e Telecomunicacoes LTDA
> _______________________________________________
> Cascavel-pm mailing list
> Cascavel-pm em pm.org
> http://mail.pm.org/mailman/listinfo/cascavel-pm
>



-- 
Igor Sutton Lopes
http://www.izut.com/
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: http://mail.pm.org/pipermail/cascavel-pm/attachments/20060710/20ba69a0/attachment.html 


Mais detalhes sobre a lista de discussão Cascavel-pm