in reply to Match only certain IP Addresses

Your problem is that when you print $_, you're printing the entire line. You want to just print the part of the regex that matched. The easiest way to do it is to capture that part of the regex with parentheses, then print out the captured portion:
#!/usr/bin/perl -w use strict; while (<DATA>) { if (/\s(159\.230\.\d+\.\d+)/) { print $1,"\n"; } } __DATA__ network-object 159.230.123.000 255.255.224.0 network-object 159.230.234.000 255.255.252.0 network-object 159.230.111.000 255.255.255.0 network-object host 159.230.101.000 network-object host 159.230.200.000 network-object host 159.230.6.000