in reply to Just want to print "userName"

Nothing simpler: in the second loop, lose the inner (for  $value) loop, and replace it with the simple
print "$i: userName is $curusers[$i]{$value}\n";