in reply to user input for hash

I don't understand, but I think you're asking how to associate more than one value with one hash key. A hash value must be a scalar, but the scalar can be anything, including a string formed from the that concatenation of more than one value, or a reference of an array of values. The following in an example of the latter:

my %h; for my $v (qw( a b )) { push @{ $h{key} }, $v; } for my $k (keys(%h)) { print("$k: ", join(', ', @{ $h{$k} }), "\n"); }

No, it appears to be much simpler than that. You appear to be having problems with a 1-to-1 mapping.

Keeping the same input format, you have parallel arrays. To associate the elements of each parallel array, you need to iterate over the indexes of the those arrays.

kate dan ^Z doug.smith test ^Z
print "Enter names of user to add:\n"; chomp( my @users = map lc, <> ); print "Enter names of user to mirror:\n"; chomp( my @exusers = map lc, <> ); my %adds; fore my $i (0..$#users) { $adds{$users[$i]} = qx(ls /home/$exusers[$i]/.bash_profile); }

Parallel arrays are rarely a good idea. May I suggest a better input format:

kate doug.smith dan test ^Z
my %adds; print "Enter new user and mirrored user pairs:\n"; while (<>) { chomp; my ($user, $exuser) = map lc, split; $adds{$user} = qx(ls /home/$exuser/.bash_profile); }