File::Searcher::Interactive

File::Searcher::Interactive is a Perl module that searches for files and performs search/replacements on matching files.
Download

File::Searcher::Interactive Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Adam Stubbs
  • Publisher web site:
  • http://search.cpan.org/~astubbs/File-Searcher-Interactive-0.9/Interactive.pm

File::Searcher::Interactive Tags


File::Searcher::Interactive Description

File::Searcher::Interactive is a Perl module that searches for files and performs search/replacements on matching files. 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, MI49097', 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 Requirements: · Perl


File::Searcher::Interactive Related Software