<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Eu achava que o comando:opendir(DIR, $dir) ........<br>Nao precisaria do diretorio :)<br><br>Obrigada<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">De:</span></b> Ednardo Lobo &lt;ednardo@lobo.eti.br&gt;<br><b><span style="font-weight: bold;">Para:</span></b> Cascavel Perl Mongers &lt;cascavel-pm@pm.org&gt;<br><b><span style="font-weight: bold;">Enviadas:</span></b> Quinta-feira, 20 de Maio de 2010 13:29:06<br><b><span style="font-weight: bold;">Assunto:</span></b> Re: [Cascavel-pm] Verificar tamanho arquivo<br></font><br>Patty,<br><br>Use "$dir/$file" ao invés de apenas
 "$file".<br><br>;-)<br><br><br>Patty Silva escreveu:<br>&gt; Olá Pessoal,<br>&gt; Uma dúvida boba que surgiu e que não está funcionando.<br>&gt; Estou lendo um diretorio no qual tentei usar o next if para nao pegar os arquivos vazios.<br>&gt; Só que nao esta funcionando. Alguem saberia me dizer o pq??<br>&gt; <br>&gt; <br>&gt; opendir(DIR, $dir) or die "Erro ao tentar acessar o diretorio:$!";<br>&gt; <br>&gt; foreach my $file (sort(readdir DIR))<br>&gt; {<br>&gt; <br>&gt; <br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  if(-z $file)&nbsp; &nbsp; {print "File is empty!\n";} --------&gt; Nao funcionou<br>&gt; <br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  next if $file eq '.' or $file eq '..' or ($file !~ /\.log$/ ) or -z $file;&nbsp; ----------&gt; tb nao funcionou...<br>&gt; ...........<br>&gt; <br>&gt; <br>&gt; <br>&gt; Obrigada<br><br>--&nbsp; &nbsp;  Ednardo Lobo<br><br><span>&nbsp; &nbsp; <a target="_blank"
 href="http://www.lobo.eti.br">www.lobo.eti.br</a></span><br>_______________________________________________<br>Cascavel-pm mailing list<br><a ymailto="mailto:Cascavel-pm@pm.org" href="mailto:Cascavel-pm@pm.org">Cascavel-pm@pm.org</a><br><a href="http://mail.pm.org/mailman/listinfo/cascavel-pm" target="_blank">http://mail.pm.org/mailman/listinfo/cascavel-pm</a><br></div></div>
</div><br>



      &nbsp;</body></html>