Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: File::Find blind

by Aragorn (Curate)
on Jun 25, 2004 at 18:41 UTC ( #369711=note: print w/ replies, xml ) Need Help??


in reply to File::Find blind

You put the $source_dir variable inside the hashref which is the first argument. $source_dir should be the second argument to find:

find({ no_chdir => 1, wanted => sub { print STDERR "*** Doing $_ ***\n"; if (-f) { print "...Adding $_\n" } elsif (-d _) { print "Adding dir $_...\n" } } }, $source_dir) or die "$0: $!\n";
Arjen


Comment on Re: File::Find blind
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (11)
As of 2015-07-29 00:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls