julia said:
This command doesn't seem to be correct.
find \&lsRuleFiles, "$rulesPath";
Does someone can give me examples of the right
syntax to use find command ?
That looks correct to me -- providing you're using the find()
function from the File::Find module. I'll even include that exact line
in a small Perl script to demontrate that it is correct.
All this Perl script does is print out the names of all files and
directories found inside '.' (the current directory):
#!/usr/bin/perl
use strict;
use warnings;
use File::Find;
sub lsRuleFiles
{
print "Found $File::Find::name\n";
}
my $rulesPath = '.'; # the current directory
find \&lsRuleFiles, "$rulesPath";
__END__
So the line of code you provided works perfectly as is. If you
still have a problem, you'll have to provide us with a small program
that we can run to reproduce your exact problem. Once we can reproduce
your problem and see the exact error message(s) that you see, then we
can figure out what needs correcting.
I hope this helps, Julia.
-- Jean-Luc Romano