in reply to Return to original loop

If you have < ~ 2M IP's to check, you could use this (untested):
my %ips_to_check = map {chomp; $_ => undef} <DATA>; while (my $confLine = <$in>) { if ($confLine =~ /ip4-address address="([\d\.]+)"/ and exists $ips_to_check{$1}){ $confLine =~ s{/>}{update"/>}; } print {$out} $confLine; }

        Software efficiency halves every 18 months, thus compensating for Moore's Law.