Pessoal consegui<br> <br> Fiz assim: e funcionou.. porem nao sei se eh a melhor forma:<br>  <br>  &lt;CODE&gt;<br>  --------------------------------------------------------------------------------------------------------------------------------<br>  <span style="color: rgb(255, 0, 0);">#!/usr/bin/perl</span><br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">#</span><br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">my $caminho= "$ENV{HOME}/perl";</span><br style="color: rgb(255, 0, 0);">  <br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">chdir ($caminho) || die "\n *** Erro no diretorio $caminho ***";</span><br style="color: rgb(255, 0, 0);">  <br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">while ($arquivo = &lt;*.txt&gt;)</span><br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">{</span><br style="color: rgb(255, 0, 0);">  <br style="color: rgb(255, 0,
 0);">  <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $arquivo=~ /(\d\d\d\d\d\d\d\d\d\d)/;</span><br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $arquivo=$1;</span><br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; push(@arquivos,$arquivo);</span><br style="color: rgb(255, 0, 0);">  <br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">}</span><br style="color: rgb(255, 0, 0);">  <br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);"></span><span style="color: rgb(255, 0, 0);">my %hash;</span><br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">foreach (@arquivos)</span><br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">{</span><br style="color: rgb(255,
 0, 0);">  <span style="color: rgb(255, 0, 0);">&nbsp; $hash{$_} = 1;</span><br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">}</span><br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">foreach (sort keys %hash)</span><br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">{</span><br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">&nbsp; print "$_\n";</span><br style="color: rgb(255, 0, 0);">  <span style="color: rgb(255, 0, 0);">&nbsp; `cat $_* &gt;$_.txt`;<br>  </span><span style="color: rgb(255, 0, 0);">}</span><br style="color: rgb(255, 0, 0);">  <br>  --------------------------------------------------------------------------------------------------------------------------------<br>  <br>  <br>  E outra coisa.. queria apagar os arquivos permanecendo somente o que eu concatenei.. :)<br>  <br>  Obrigada pessoal<br> <img
 src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/18.gif"><br> <br><br><b><i>Patty Silva &lt;ptfzs@yahoo.com.br&gt;</i></b> escreveu:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Ola Pessoal..<br>Eu again! :)<br><br>Fiz um script para concatenar arquivo de um diretorio:<br><br>&lt;CODIGO&gt;<br>---------------------------------------------------------------------------------------------<br><span style="color: rgb(255, 0, 0);">my $caminho= "$ENV{HOME}/teste";</span><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">chdir ($caminho) || die "\n *** Erro no diretorio $caminho ***";</span><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">while ($arquivo = &lt;*.txt&gt;)</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">{</span><br style="color: rgb(255, 0, 0);"><br
 style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">&nbsp; $InFile= $caminho.$arquivo;</span><br style="color: rgb(255, 0, 0);"> <br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">&nbsp;  push(@arquivos,$arquivo);</span><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">}</span><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">system(`cat @arquivos&gt;&gt;$data_out.tmp`);</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">unlink(@arquivos);</span><br><br>---------------------------------------------------------------------------------------------<br><br>Porem quero concatenar arquivos com a msm data ou seja, <br>os nomes dos arquivos sao ANOMESDIAHORA_tipo.txt<br>Quero concatenar arquivos com ANOMESDIAHORA iguais.. e gerar somente um ANOMESDIA.txt <br><br>Se alguem puder me dar uma lUz
 :)<br><br>Obrigada<br><img src="http://us.i1.yimg.com/us.yimg.com/i/mesg/tsmileys2/03.gif"><br><br><br><div>    </div><hr size="1">  Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. <a href="http://us.rd.yahoo.com/mail/br/tagline/mobile_alerts/*http://br.mobile.yahoo.com/mailalertas/">Registre seu aparelho agora!</a>_______________________________________________<br>Cascavel-pm mailing list<br>Cascavel-pm@pm.org<br>http://mail.pm.org/mailman/listinfo/cascavel-pm</blockquote><br><p>&#32;
                <hr size=1> 
Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar seu conhecimento? Experimente o <a href="http://us.rd.yahoo.com/mail/br/tagline/answers/*http://br.answers.yahoo.com/">Yahoo! Respostas</a>!