I have been trying examples for hours but I can\'t seem to grasp how to do what I want to do.
I want to return a hash from a subroutine, and I figured a reference wa
You probably don't want to be doing this:
return \$hashTable{ $login };
You are returning a reference (pointer) to your hash. Try just
return $hashTable{$login}
Which will return the account number.
Or if you really want a hash with a bunch of people in there then
return \$hashTable
is fine (don't add the {$login} part), but on the other side you need to be dereferencing.
eg:
my $p = authUser()
if ($p->{'Dr. Brule'})
...
Notice the -> in there. It de-references the pointer you passed back.