Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
"be consistent"
 
PerlMonks  

Re: Noob File::Find issue

by thomas895 (Friar)
on May 01, 2012 at 01:53 UTC ( #968192=note: print w/ replies, xml ) Need Help??


in reply to Noob File::Find issue

Also, not all modules export their subroutines. I have no idea if File::Find does(and I'm too lazy to check), so you might have to do one of the following:

#These statements are equivalent use File::Find qw( find ); use File::Find 'find';
I personally find it good practice(by my own conventions) to do that, just to make it clearer to myself where a function comes from. Your choice, ultimately.

~Thomas~ I believe that the source code to life is written in Perl :-)


Comment on Re: Noob File::Find issue
Select or Download Code
Re^2: Noob File::Find issue
by GrandFather (Cardinal) on May 01, 2012 at 02:14 UTC

    If I'm interested in knowing where stuff comes from I do exactly the opposite:

    use File::Find qw(); ... File::Find::find(...);

    By the time I'm a few dozen lines away from the top of the file I've probably completely forgotten where find() came from. A sometimes other benefit of being explicit is that if there is a 'find' in several different modules that are in use then it is clear which one is wanted.

    True laziness is hard work

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (18)
As of 2013-05-21 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (439 votes), past polls