G
gargoyle
The File::Find man page says, under DESCRIPTION:
"find()" does a depth-first search over the given
@directories in the order they are given.
What exactly does depth-first mean here? I'm asking because to me it
signifies that filesystem children objects will come before their
parent. But the opposite happens in Perl 5.8.4, both on OpenBSD 3.6,
and the ActiveState 5.8.4 build 810. Well that's the behavior I get out
of this script anyway:
#!/usr/bin/perl -w
use File::Find;
@dirs = @ARGV;
find({ wanted => \&wanted, follow => 0, no_chdir => 1 }, @dirs);
sub wanted {
print "$_\t$File::Find::name\n";
}
Also, I checked an old Debian(3.0) Linux box sitting around here (with
Perl 5.6.1 installed) and its man page doesn't mention find() as being
depth-first.
"find()" does a depth-first search over the given
@directories in the order they are given.
What exactly does depth-first mean here? I'm asking because to me it
signifies that filesystem children objects will come before their
parent. But the opposite happens in Perl 5.8.4, both on OpenBSD 3.6,
and the ActiveState 5.8.4 build 810. Well that's the behavior I get out
of this script anyway:
#!/usr/bin/perl -w
use File::Find;
@dirs = @ARGV;
find({ wanted => \&wanted, follow => 0, no_chdir => 1 }, @dirs);
sub wanted {
print "$_\t$File::Find::name\n";
}
Also, I checked an old Debian(3.0) Linux box sitting around here (with
Perl 5.6.1 installed) and its man page doesn't mention find() as being
depth-first.