#!/usr/bin/perl use strict; use warnings; use Data::Dumper::Simple; my @array; my %hash; while(){ chomp; @array = split /\s+\s+/, $_; %hash = ($array[0] => {$array[1] => $array[2]}); } print Dumper (%hash); __DATA__ susan anus@delta.co.th cannot find your hostname jennifer r_curran@ntnu.no cannot find your hostname jennifer jones@bol.net.in cannot find your hostname jennifer millionairemaker@freshcornam.com cannot find your hostname tim millionairemaker@freshcornam.com cannot find your hostname jennifer cmayer@kareltek.fi cannot find your hostname jack ictiplo@tiplo.com.tw cannot find your hostname russ orders@koss.com Host not found clara Sandra@camrpc.com Host not found jennifer Warranty@onlogixx.com cannot find your hostname employment elitemate@rllformat.com cannot find your hostname jack JHuffman@pulsetech.net cannot find your hostname clara Sandra@camrpc.com Host not found susan linda@kepro.com.tw cannot find your hostname jobs kwillis@cors.com Host not found employment LifeShopDirect@freshcornam.com Host not found #### %hash = ( 'employment' => { 'LifeShopDirect@freshcornam.com' => 'Host not found' } );