<?xml version="1.0" encoding="windows-1252"?>
<node id="515097" title="File::Find questions" created="2005-12-07 20:11:41" updated="2005-12-07 15:11:41">
<type id="115">
perlquestion</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
I have 2 questions concerning File::Find. 
&lt;p&gt;
1. Considering the following code snippet, can someone tell  me what is going on?
&lt;c&gt;
@path{@INC} = ();
# Then later in the find sub, we see:
$File::Find::prune = 1, 
return if exists $path{$File::Find::dir} and $File::Find::dir ne $File::Find::topdir;

# What is going in the above line? What is the purpose?
&lt;/c&gt;
2. The following gives me the desired results (the file name without its location), except when the starting directory is /. Why? And what could I do to fix it?  
&lt;c&gt;
$name = substr $File::Find::name, length $File::Find::topdir;
&lt;/c&gt;
Thanks!
</field>
<field name="reputation">
8</field>
</data>
</node>
