Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://369711]
help
Chatterbox?
[Discipulus]: from txt to array, from array to polemic, from polemic to flame?
[Corion]: Discipulus++ # profound insight
[Corion]: :-D
[Discipulus]: the very same topic was discussed in CB yesterday at lunch time
[Discipulus]: or can I ask for a module to do the back conversion from flame to txt?

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2017-06-23 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (537 votes). Check out past polls.