NorthernHeights
Programmer
I have a tough nut that I have not been able to crack. Any help would be apprecriated. I'm using File::Find.
Inside the wanted function of the find command I want to build a data structure and pass it back. I have even tried making the data structure global but doesn't work either.
Here is what I'm calling:
find( {wanted => \&GetFiles, follow => 1}, $ReducedSearchPath);
Here is the approx syntax of what I want to do:
find( {wanted => %{$PossibleMatches} = \&GetFiles(\%PossibleMatches), follow => 1}, $ReducedSearchPath);
sub GetFiles {
my $HashRef = shift @_;
my %FoundFiles = %{$HashRef};
# Make some modifications to %FoundFiles
return \%FoundFiles;
}
And ideas? I can't seem to get it to work. I don't know if it's my syntax of the find command.
Many thanks
Inside the wanted function of the find command I want to build a data structure and pass it back. I have even tried making the data structure global but doesn't work either.
Here is what I'm calling:
find( {wanted => \&GetFiles, follow => 1}, $ReducedSearchPath);
Here is the approx syntax of what I want to do:
find( {wanted => %{$PossibleMatches} = \&GetFiles(\%PossibleMatches), follow => 1}, $ReducedSearchPath);
sub GetFiles {
my $HashRef = shift @_;
my %FoundFiles = %{$HashRef};
# Make some modifications to %FoundFiles
return \%FoundFiles;
}
And ideas? I can't seem to get it to work. I don't know if it's my syntax of the find command.
Many thanks