in reply to traverse directory recursively and search for pattern
ack --nobinary --match "PATTERN" directory directory
use File::Find::Rule;
my @specs = ( qr/pattern/i, [ qr/notpattern/i ], \&oneline );
find(
file =>
ascii =>
exec => \&onename,
grep => \@specs,
in => \@dirs,
);
sub onename {
my( $shortname, $path, $fullname )= @_;
$_ = $shortname;
1;
}
sub oneline {
my( $shortname, $path, $fullname )= @_;
my $line = $_;
1;
}
http://search.cpan.org/perldoc/Path::Iterator::Rule#SEE_ALSO
|
---|
In Section
Seekers of Perl Wisdom