open my $ip_fh, '<', $ip_file or die "Unable to open $ip_file for reading: $!";