Hello Folks,
#!/usr/bin/perl
use File::Find;
open F,shift or die $!;
my %ip=map/(\S+)\s+(\S+)/,<F>;
close F;
find sub{
if( -f ){
local @ARGV=($_);
local $^I="";
while( <> ){
!/#/ && s/(\w+)\.fs\.rich\.us/$ip{$1}/g;
print;
}
}
},@ARGV;
When I run this it does it job, but I dont need the . ((dot)) after the IP
$ ./trythis.pl rich-input.txt *
option domain-name-servers 199.131.101.210., 199.131.101.161.;
I am trying to get it to look like this:
option domain-name-servers 179.131.101.210,129.131.101.161;
Thanks for your help in trying to TS this. I cant seem to figure this one out