Since the values in $array[0] are not necessarily unique, this potentially replaces the contents of $hash{$array[0]}. You need a HoAoH, or some variant thereof.
Output (note the single entry for 'jennifer', for example):
$VAR1 = { 'jack' => { 'JHuffman@pulsetech.net' => 'cannot find your ho +stname' }, 'jobs' => { 'kwillis@cors.com' => 'Host not found' }, 'jennifer' => { 'Warranty@onlogixx.com' => 'cannot find your + hostname' }, 'tim' => { 'millionairemaker@freshcornam.com' => 'cannot fin +d your hostname' }, 'susan' => { 'linda@kepro.com.tw' => 'cannot find your hostn +ame' }, 'russ' => { 'orders@koss.com' => 'Host not found' }, 'employment' => { 'LifeShopDirect@freshcornam.com' => 'Host +not found' }, 'clara' => { 'Sandra@camrpc.com' => 'Host not found' } };
In reply to Re^2: HoH question
by bobf
in thread HoH question
by cajun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |