Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove entry from a file in perl

Status
Not open for further replies.

5jgibbs

IS-IT--Management
Mar 8, 2005
151
US
I have a file that contains the following.

Code:
246		IN	PTR	ip-3-1-246.
246		IN	PTR	some-name-here.
247		IN	PTR	ip-3-1-247.
248		IN	PTR	ip-3-1-248.
249		IN	PTR	ip-3-1-249.
250		IN	PTR	ip-3-1-250.
251		IN	PTR	ip-3-1-251.
252		IN	PTR	ip-3-1-252.
253		IN	PTR	ip-3-1-253.
254		IN	PTR	ip-3-1-254.
255		IN	PTR	ip-3-1-255.

I have a bunch of lines for example that have ip-3-1-246. and it's actual reverse lookup name. If it has an actual name in the file like "web-server" and an entry like "ip-3-1-246" for ip 246. How would I remove the line for ip-3-1-246 only. I have a feeling this will need to involve multiple arrays.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top