File::Searcher::Interactive is a Perl module that searches for files and performs search/replacements on matching files, uses terminal to make the searches interactive.
SYNOPSIS
use File::Searcher::Interactive;
my $search = File::Searcher->new('*.cgi');
$search->add_expression(name=>'street', search=>'1234 Easy St.', replace=>'456 Hard Way', options=>'i');
$search->add_expression(name=>'department', search=>'(Dept.|Department)(s+)(d+)', replace=>'$1$2$3', options=>'im');
$search->add_expression(name=>'place', search=>'Portland, OR(.*?)97212', replace=>'Vicksburg, MI${1}49097', options=>'is');
$search->interactive;
# $search->start; SEE File::Searcher
@files_matched = $search->files_matched;
print "Files Matchedn";
print "t" . join("nt", @files_matched) . "n";
print "Total Files:t" . $search->file_cnt . "n";
print "Directories:t" . $search->dir_cnt . "n";
my @files_replaced = $search->expression('street')->files_replaced;my @files_replaced = $search->expression($expression)->files_replaced;
my %matches = $search->expression('street')->matches;
my %replacements = $search->expression('street')->replacements;
File::Searcher::Interactive is a sub-class of File::Searcher which allows for the traversing of a directory tree for files matching a Perl regular expression. When a match is found, the statistics are stored and if the file is a text file a series of searches and replacements can be performed. File::Searcher::Interactive uses the terminal to prompt the user for interactive replacements.
Requirements:
· Perl
Product's homepage
Requirements:
· Perl