Categories
Perl

Extract IPv4 Address From Text Using Perl

I had a list of IP address and wanted to know what they were – but I didn’t want to do a DNS lookup by hand on each. The list I had was really a chunk of text with IPv4 addresses all over in it. Here is how I extracted them for the report: