<span style="white-space: pre-wrap;">Nao e pra:<br><br>        </span>my @arquivos = grep(/^$produrar/,@thefiles); <span style="white-space: pre-wrap;"></span><br><br>ser antes do que:<br><br><div>foreach my $f (@thefiles)</div><br>
?<br><br>e ae o foreach ser de @arquivos?<br><br>Ole<br><br><div class="gmail_quote">2010/8/20 Ailton Zacarias <span dir="ltr">&lt;<a href="mailto:ailtonzsilva@gmail.com">ailtonzsilva@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;">
Bom dia Amigos<div><br></div><div>Gostaria de saber onde estou errando ... pq na listagem de arquivos ele duplica os nomes de arquivos??? Obrigado!</div><div><br></div><div><div><br></div><div>use strict;</div><div>use warnings;</div>


<div><br></div><div>my $diretorio=&quot;C:/Tmp/e-Mails/ENVIADOS&quot;;</div><div>opendir(IMD, $diretorio) || die(&quot;Cannot open directory&quot;);</div><div>my @thefiles= readdir(IMD);</div><div>closedir(IMD);</div><div>


<br></div><div>my $produrar = &#39;ALLTASKS&#39;;</div><div><br></div><div>open(ARQ1,&quot;&gt;Lista.html&quot;);</div><div>print ARQ1 &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;Listagem de arquivos&lt;/title&gt;&lt;/head&gt;\n&quot;;</div>


<div>print ARQ1 &quot;&lt;body&gt;&lt;h1&gt;Listagem de Arquivos\n&quot;;</div><div><br></div><div><br></div><div>foreach my $f (@thefiles)</div><div>{</div><div> unless ( ($f eq &quot;.&quot;) || ($f eq &quot;..&quot;) )</div>


<div> { </div><div> <span style="white-space: pre-wrap;">        </span>my @arquivos = grep(/^$produrar/,@thefiles); </div><div><span style="white-space: pre-wrap;">        </span>foreach my $Nome(@arquivos)</div>

<div><span style="white-space: pre-wrap;">        </span>{</div><div><span style="white-space: pre-wrap;">        </span>  print ARQ1 &quot;&lt;table&gt;&lt;td&gt;&lt;a href=&quot;.$diretorio.&quot;/&quot;.$Nome.&quot;&gt;&quot;.$Nome.&quot;&lt;/a&gt;&lt;/td&gt;&lt;/table&gt;&quot;;</div>


<div><span style="white-space: pre-wrap;">        </span>}    </div><div> }</div><div>}</div><div><br></div><div>print ARQ1 &quot;&lt;/body&gt;&lt;/html&gt;\n&quot;;</div><div>close(ARQ1);</div></div><div><br></div><font color="#888888">

<div><br></div><div><br clear="all"><br>-- <br>Ailton Zacarias<br>F4 Computer – Soluções em Tecnologia da Informação<br>Tel: 55 +11 4062-0180 (Ailton)<br>Cel: 55 +11 8405-8334<br>MSN: <a href="mailto:ailton@f4computer.com" target="_blank">ailton@f4computer.com</a><br>


Skype: ailton.zacarias<br><a href="http://www.f4computer.com" target="_blank">http://www.f4computer.com</a><br>
</div>
</font><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></blockquote></div><br><br clear="all"><br>-- <br>########################################<br>Quem Leva Brincadeira somente por Brincadeira<br>
                   E Sério somente Sério<br>       De Fato Desentendeu Ambos - Piet Hein<br>########################################<br>                  Ole Peter Smith, IME, UFG<br>          <a href="http://www.mat.ufg.br">http://www.mat.ufg.br</a> - ole at <a href="http://mat.ufg.br">mat.ufg.br</a><br>
######################################<br>             Live sure is a Mystery to be Lived<br>                  Not a Problem to be Solved<br>######################################<br><br>