When you run the following code, the file names of all the files below C: \ Test are printed. Why doesn't it print only Hello(n times, depending on how many files are processed)?
Does this mean that I cannot rely on shiftto securely appoint $_? Imagine that an employee implements a function wtfand does not know what he called from a fake File::Find. I am running this code with Strawberry Perl 5.12
Edit: this code also doesn't work like this:
use strict;
use warnings;
wanted();
sub wanted{
wtf("Hello");
}
sub wtf {
shift;
print;
}
So, I think I'm completely off the highway here .. This obviously has nothing to do with File :: Find, now I'm looking for a new name for this question. Here is my original code:
use strict;
use warnings;
use File::Find;
find(\&wanted, "C:\\test");
sub wanted{
wtf("Hello");
}
sub wtf {
shift;
print;
}