# make the data a string $value = join("|", $VLAN, $MAC, $INT); # put them into a 1 dimentional hash (however, servers with the same mac hash overwrite each other, although you can check) if( defined $HASH{$mac} ) { warn "Two servers with the same $mac"; }else{ $HASH{$mac}=$value; }