sub fileFindReplace { my $searchpath = shift; my $ipmapper = shift; #print "searchpath : <$searchpath>\n"; #print "ipmapper : <$ipmapper>\n\n"; find(\&wanted, $searchpath); sub wanted { local (@ARGV) = shift; local ($^I) = ".80south"; open (INPUTFILE, $ipmapper) or die "Could not open file: $!"; my (@mapper) = ; foreach my $line (@mapper) { my ($oldaddr, $newaddr,) = split (/\t/, $line, 2); } close INPUTFILE; my $filename = $File::Find::name; return unless -f $filename; return unless $filename =~ /$ARGV/; open (FR, $filename) or print "Could not read $filename\n" && return; my (@file) = ; close FR; print "read ", scalar(@file), " lines from $filename\n"; open (FW, ">$filename") or print "Could not open for write $filename\n" && return; unless ( open FW, ">$filename" ) { print "could not open $filename for write: $!"; return; } foreach my $find (@file) { print "