in reply to Appending data to a file in a specific location

So you need defineв ifaces and there's ip's?
... while(/\*\*\*\() \*\*/g) { my $iface = $1; if(/\G ip adress (\d+\.\d+\.\d+\.\d+/){print "iface $iface is definde +with $1"} } ...
I could be wrong.