mais uma tacada:<br><br>sub merge{$z="a";@{$z++}=split//for@_;join"",map{$a[$_].$b[$_]}0..@a+@b}<br><br clear="all">Just another Perl Hacker,<br>Fernando (SmokeMachine)<br><a href="http://perl-e.org">http://perl-e.org</a><br>
Sent from Rio De Janeiro, RJ, Brazil<br>
<br><br><div class="gmail_quote">2010/2/4 Daniel de Oliveira Mantovani <span dir="ltr"><<a href="mailto:daniel.oliveira.mantovani@gmail.com">daniel.oliveira.mantovani@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Ops ele diz sim desculpa....<br>
<br>
On 4 February 2010 13:28, Daniel de Oliveira Mantovani<br>
<div><div></div><div class="h5"><<a href="mailto:daniel.oliveira.mantovani@gmail.com">daniel.oliveira.mantovani@gmail.com</a>> wrote:<br>
> Que eu saiba tem que retornar a saída que o blabos pois:<br>
> merge('abc', 12345) -> a1b2c345<br>
><br>
> Ele não diz que a saída é uma string.<br>
><br>
> Pelo que eu entendi tem que aparecer isso no terminal:<br>
> a1b2c345<br>
><br>
> 2010/2/4 Fernando Oliveira <<a href="mailto:fernandocorrea@gmail.com">fernandocorrea@gmail.com</a>>:<br>
>> Mantovani, claro q precisa! Isso nao ta retornando uma string...<br>
>><br>
>> On Feb 4, 2010 12:59 PM, "Daniel de Oliveira Mantovani"<br>
>> <<a href="mailto:daniel.oliveira.mantovani@gmail.com">daniel.oliveira.mantovani@gmail.com</a>> wrote:<br>
>><br>
>> Não precisa do join:<br>
>> sub merge{@b=split//,pop;@a=split//,pop;map{$a[$_].$b[$_]}0..@a+@b}<br>
>><br>
>> mantovani@mantovani-desktop:~$ perl -MMerge -E 'say merge("dan",12)'<br>
>> d1a2n<br>
>><br>
>><br>
>> 2010/2/4 breno <<a href="mailto:breno@rio.pm.org">breno@rio.pm.org</a>>:<br>
>>> e -2 tirando parenteses<br>
>>><br>
>>> sub merge{@b=split//,pop;@a=split...<br>
>><br>
>> --<br>
>> "If you’ve never written anything thoughtful, then you’ve never had<br>
>> any difficult, important, or interesting thoughts. That’s the secret:<br>
>> people who don’t write, are people who don’t think."<br>
>><br>
>> _______________________________________________<br>
>> Rio-pm mailing list<br>
>> <a href="mailto:Rio-pm@pm.org">Rio-pm@pm.org</a><br>
>> http://mail.pm.org...<br>
>><br>
>> _______________________________________________<br>
>> Rio-pm mailing list<br>
>> <a href="mailto:Rio-pm@pm.org">Rio-pm@pm.org</a><br>
>> <a href="http://mail.pm.org/mailman/listinfo/rio-pm" target="_blank">http://mail.pm.org/mailman/listinfo/rio-pm</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> "If you’ve never written anything thoughtful, then you’ve never had<br>
> any difficult, important, or interesting thoughts. That’s the secret:<br>
> people who don’t write, are people who don’t think."<br>
><br>
<br>
<br>
<br>
--<br>
"If you’ve never written anything thoughtful, then you’ve never had<br>
any difficult, important, or interesting thoughts. That’s the secret:<br>
people who don’t write, are people who don’t think."<br>
_______________________________________________<br>
Rio-pm mailing list<br>
<a href="mailto:Rio-pm@pm.org">Rio-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/rio-pm" target="_blank">http://mail.pm.org/mailman/listinfo/rio-pm</a><br>
</div></div></blockquote></div><br>