Okay,
I need a bit of help here. there are thousands of lines in some files.
I am trying to match the lines that have
"address\s<ip_address>/<netmask>" and save the IP to $loopback except if
the IP address/netmask is "127.0.0.1/32".
--- code snipet ----
my $ipaddressNetmask =
qr/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\/[0-9]+/;
grep (/address\s($ipaddressNetmask)$/, @lines) and $loopback = $1;
---- code snipet ----
Clues please?
Cheers,
Noah
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/