Does anyone know how to make File:Find can search through symlink directory?
I have a real directory at
/home/alex/mydir1
and a symlink directory inside
/home/alex/mydir1/test -> ../mydir2
Here is my code:
#!/depot/perl-5.8.3/bin/perl
use strict;
use File::Find qw(find);
my $path = "/home/alex/mydir1";
find(\&Search,follow => 1, $path);
sub Search{
my $path = $File::Find::name;
print $path."\n";
}
And the result is:
/home/alex/mydir1
/home/alex/mydir1/test
Why it's not search through /home/alex/mydir2 and print out every files inside ? Can anyone show me how to do that ?
Thank you and best regards.
Alex