open(SUBNET, ") { chomp; if($_ eq $ip_subnet) { $exists++; last; } } close(SUBNET); if($exists) { print "PASS\n"; } else { print "FAIL\n"; }