[Rio-pm] Listagem de Arquivos

Ailton Zacarias ailtonzsilva em gmail.com
Sexta Agosto 20 07:35:32 PDT 2010


Opa Funcionou!

Muito Obrigado.

2010/8/20 Ole Peter Smith <ole.ufg em gmail.com>

> Nao e pra:
>
> my @arquivos = grep(/^$produrar/, em thefiles);
>
> ser antes do que:
>
> foreach my $f (@thefiles)
>
> ?
>
> e ae o foreach ser de @arquivos?
>
> Ole
>
> 2010/8/20 Ailton Zacarias <ailtonzsilva em gmail.com>
>
>> Bom dia Amigos
>>
>> Gostaria de saber onde estou errando ... pq na listagem de arquivos ele
>> duplica os nomes de arquivos??? Obrigado!
>>
>>
>> use strict;
>> use warnings;
>>
>> my $diretorio="C:/Tmp/e-Mails/ENVIADOS";
>> opendir(IMD, $diretorio) || die("Cannot open directory");
>> my @thefiles= readdir(IMD);
>> closedir(IMD);
>>
>> my $produrar = 'ALLTASKS';
>>
>> open(ARQ1,">Lista.html");
>> print ARQ1 "<html><head><title>Listagem de arquivos</title></head>\n";
>> print ARQ1 "<body><h1>Listagem de Arquivos\n";
>>
>>
>> foreach my $f (@thefiles)
>> {
>>  unless ( ($f eq ".") || ($f eq "..") )
>>  {
>>   my @arquivos = grep(/^$produrar/, em thefiles);
>> foreach my $Nome(@arquivos)
>>  {
>>   print ARQ1 "<table><td><a
>> href=".$diretorio."/".$Nome.">".$Nome."</a></td></table>";
>>  }
>>  }
>> }
>>
>> print ARQ1 "</body></html>\n";
>> close(ARQ1);
>>
>>
>>
>>
>> --
>> Ailton Zacarias
>> F4 Computer – Soluções em Tecnologia da Informação
>> Tel: 55 +11 4062-0180 (Ailton)
>> Cel: 55 +11 8405-8334
>> MSN: ailton em f4computer.com
>> Skype: ailton.zacarias
>> http://www.f4computer.com
>>
>> _______________________________________________
>> Rio-pm mailing list
>> Rio-pm em pm.org
>> http://mail.pm.org/mailman/listinfo/rio-pm
>>
>
>
>
> --
> ########################################
> Quem Leva Brincadeira somente por Brincadeira
>                    E Sério somente Sério
>        De Fato Desentendeu Ambos - Piet Hein
> ########################################
>                   Ole Peter Smith, IME, UFG
>           http://www.mat.ufg.br - ole at mat.ufg.br
> ######################################
>              Live sure is a Mystery to be Lived
>                   Not a Problem to be Solved
> ######################################
>
>
> _______________________________________________
> Rio-pm mailing list
> Rio-pm em pm.org
> http://mail.pm.org/mailman/listinfo/rio-pm
>



-- 
Ailton Zacarias
F4 Computer – Soluções em Tecnologia da Informação
Tel: 55 +11 4062-0180 (Ailton)
Cel: 55 +11 8405-8334
MSN: ailton em f4computer.com
Skype: ailton.zacarias
http://www.f4computer.com
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/rio-pm/attachments/20100820/0e027fa4/attachment.html>


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