> Script purpose:
> I am trying to search an extremely large mounted dir on NT and find the location of
>any file or dir that starts with a certain string that is given on command line.
>
> Problem:
> File::Find::find({wanted => \&wanted}, 'e:\\');
> There is something about this line that is just not working. I can enter a specific
>directory, such as 'e:\\foobar' and get the results that I desire. However if I
>leave it as it is in the script, the file does not display. I also get an opendir()
>error entering a certain dir that does not allow the script to complete.
>
> Questions:
> 1) Why will the script work if the next level dir is specified, but will not work
>off the root of the mounted dir?
> 2) If I specify no_chdir, will the find still search the entire dir tree or just the
>next dir level?
>
> Thanks to all that help.
>
> FILE1:
>
> #! C:\Perl\bin\perl.exe -w
> eval 'exec C:\Perl\bin\perl.exe -S $0 ${1+"$@"}'
> if 0; #$running_under_some_shell
>
> use strict;
> use File::Find ();
> #open(OUT, ">> output.txt") || die "can't open output.txt: $!";
>
> # Set the variable $File::Find::dont_use_nlink if you're using AFS,
> # since AFS cheats.
>
> # for the convenience of &wanted calls, including -eval statements:
> use vars qw/*name *dir *prune/;
> *name = *File::Find::name;
> *dir = *File::Find::dir;
> *prune = *File::Find::prune;
>
> # Traverse desired filesystems
> File::Find::find({wanted => \&wanted}, 'e:\\');
>
> #close(OUT);
> print "\nfinished\n";
> exit;
>
> sub wanted {
> print "*";
> /^$ARGV[0].*\z/s &&
> print("$name\n");
> }
>
> EOF
>
>
>
> Thanks.
>