2010/5/20 Patty Silva &lt;<a href="mailto:ptfzs@yahoo.com.br">ptfzs@yahoo.com.br</a>&gt;:<br>&gt; Eu achava que o comando:opendir(DIR, $dir) ........<br>&gt; Nao precisaria do diretorio :)<br><br>perldoc -f readdir<br><br>
       readdir DIRHANDLE<br>               Returns the next directory entry for a directory opened by &quot;opendir&quot;.  If used in list context, returns all the rest of the entries<br>               in the directory.  If there are no more entries, returns an undefined value in scalar context or a null list in list context.<br>
<br>               <b>If you’re planning to filetest the return values out of a &quot;readdir&quot;, you’d better prepend the directory in question.</b>  Otherwise,<br>               because we didn’t &quot;chdir&quot; there, it would have been testing the wrong file.<br>
<br>                   opendir(DIR, $some_dir) ││ die &quot;can’t opendir $some_dir: $!&quot;;<br>                   @dots = grep { /^\./ &amp;&amp; -f &quot;$some_dir/$_&quot; } readdir(DIR);<br>                   closedir DIR;<br>