#!/usr/local/bin/perl use strict; $|++; my $input = 1; my %myhash; my @mykeys; my $key; print "enter names and values!\nleave name field emtpy and press 'Enter' when complete"; while ($input) { print "\nname :"; $input = ; if ($input) { chop $input; next if (!$input); print "name already assigned" and $input=1 and next if ($myhash{$input}); while (!$myhash{$input}) { print "value :"; $myhash{$input} = ; chop $myhash{$input}; } } } print "\n\nresults\n=======\n"; @mykeys = keys %myhash; foreach $key (@mykeys) { print "name :".$key." value: ".$myhash{$key}.". .\n"; } ####