Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Can't find module error

by arturo (Vicar)
on Apr 15, 2003 at 18:51 UTC ( [id://250644]=note: print w/replies, xml ) Need Help??


in reply to Can't find module error

The problem is that the name of the module is File::Find, not just Find

Since it is part of the standard Perl distribution, it will Just Work if you replace

use Find;
in your script with
use File::Find;

The reason is that Perl modules have name spaces, and the structure of these name spaces are reflected in directory structures; the "File" namespace is for modules deal with files and filesystems, and "Find" is one of the modules in that namespace. Thus, when you say use File::Find, perl searches for File/Find.pm in the directories in the @INC array. If you look in the directory where Find.pm resides, you'll see that there are all sorts of other files with names like Copy.pm, and at the top of every one of them will be a line that says package File::[filename];, where "filename" is the name of the file you're looking at minus its ".pm" extension.

HTH

If not P, what? Q maybe?
"Sidney Morgenbesser"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://250644]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (None)
    As of 2024-04-25 00:00 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found