#!/usr/bin/perl -w use strict; my %oui; open my $list1, "oui.txt" or die "oui.txt: $!\n"; while (<$list1>){ if (/^(.*?) {5}\(base 16\)\t\t(.*)$/) { $oui{$1} = $2; } } close $list1; while (<>){ if (/((?:\d+\.){3}\d+).*([\w.]{14})/i){ (my $temp = $2) =~ tr/.//d; print "$1 mapped to $temp for company ", $oui{substr $temp, 0, 6}, "\n"; } }