#!/usr/bin/perl while(<>){ if(/(\d+\.\d+\.\d+.\d+)/){ push(@ips,$1); } } my(@ip); foreach $i (@ips){ $no = 1; foreach $k (@ip){ if ($i eq $k){ $no = 0; last; } } if ($no){ push(@ip,$i); # print $i; } } print "
| ". $h ." | -> | "; $full = `host $h`; ($hn) = $full =~ /pointer\s(.+)\./; print $hn." |