$ perl -E '
say join q{.}, map { int rand 256 } 1 .. 4
for 1 .. 1500;' > spw1112250.dat
$
####
use strict;
use warnings;
use 5.014;
use Time::HiRes qw{ gettimeofday tv_interval };
my $startTV = [ gettimeofday() ];
my $inFile = q{spw1112250.dat};
open my $inFH, q{<}, $inFile
or die qq{open: < $inFile: $!\n};
my @lines = <$inFH>;
close $inFH
or die qq{close: < $inFile: $!\n};
s{\.\d+$}{} for @lines;
my %lookupIPs;
@lookupIPs{ @lines } = ( 1 ) x @lines;
my $lookFor = q{17.23.213};
say
qq{$lookFor },
$lookupIPs{ $lookFor } ? q{} : q{not },
qq{found in $inFile};
say qq{Process took @{ [ tv_interval( $startTV, [ gettimeofday() ] ) ] } seconds};
####
17.23.213 not found in spw1112250.dat
Process took 0.002678 seconds