Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Can't find module error

by arturo (Vicar)
on Apr 15, 2003 at 18:51 UTC ( #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"


Comment on Re: Can't find module error
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (11)
As of 2014-11-26 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (171 votes), past polls