my %h;
for my $v (qw( a b )) {
push @{ $h{key} }, $v;
}
for my $k (keys(%h)) {
print("$k: ", join(', ', @{ $h{$k} }), "\n");
}
####
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);
}
####
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);
}