mais uma tacada:<br><br>sub merge{$z=&quot;a&quot;;@{$z++}=split//for@_;join&quot;&quot;,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">&lt;<a href="mailto:daniel.oliveira.mantovani@gmail.com">daniel.oliveira.mantovani@gmail.com</a>&gt;</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">&lt;<a href="mailto:daniel.oliveira.mantovani@gmail.com">daniel.oliveira.mantovani@gmail.com</a>&gt; wrote:<br>
&gt; Que eu saiba tem que retornar a saída que o blabos pois:<br>
&gt; merge(&#39;abc&#39;, 12345) -&gt; a1b2c345<br>
&gt;<br>
&gt; Ele não diz que a saída é uma string.<br>
&gt;<br>
&gt; Pelo que eu entendi tem que aparecer isso no terminal:<br>
&gt; a1b2c345<br>
&gt;<br>
&gt; 2010/2/4 Fernando Oliveira &lt;<a href="mailto:fernandocorrea@gmail.com">fernandocorrea@gmail.com</a>&gt;:<br>
&gt;&gt; Mantovani, claro q precisa! Isso nao ta retornando uma string...<br>
&gt;&gt;<br>
&gt;&gt; On Feb 4, 2010 12:59 PM, &quot;Daniel de Oliveira Mantovani&quot;<br>
&gt;&gt; &lt;<a href="mailto:daniel.oliveira.mantovani@gmail.com">daniel.oliveira.mantovani@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Não precisa do join:<br>
&gt;&gt; sub merge{@b=split//,pop;@a=split//,pop;map{$a[$_].$b[$_]}0..@a+@b}<br>
&gt;&gt;<br>
&gt;&gt; mantovani@mantovani-desktop:~$ perl -MMerge -E &#39;say merge(&quot;dan&quot;,12)&#39;<br>
&gt;&gt; d1a2n<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; 2010/2/4 breno &lt;<a href="mailto:breno@rio.pm.org">breno@rio.pm.org</a>&gt;:<br>
&gt;&gt;&gt; e -2 tirando parenteses<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; sub merge{@b=split//,pop;@a=split...<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; &quot;If you’ve never written anything thoughtful, then you’ve never had<br>
&gt;&gt; any difficult, important, or interesting thoughts. That’s the secret:<br>
&gt;&gt; people who don’t write, are people who don’t think.&quot;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Rio-pm mailing list<br>
&gt;&gt; <a href="mailto:Rio-pm@pm.org">Rio-pm@pm.org</a><br>
&gt;&gt; http://mail.pm.org...<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Rio-pm mailing list<br>
&gt;&gt; <a href="mailto:Rio-pm@pm.org">Rio-pm@pm.org</a><br>
&gt;&gt; <a href="http://mail.pm.org/mailman/listinfo/rio-pm" target="_blank">http://mail.pm.org/mailman/listinfo/rio-pm</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; &quot;If you’ve never written anything thoughtful, then you’ve never had<br>
&gt; any difficult, important, or interesting thoughts. That’s the secret:<br>
&gt; people who don’t write, are people who don’t think.&quot;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
&quot;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.&quot;<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>