in reply to hash problems

at the first spot and without deep analysis:

1. plz start your scripts with use strict; and use warnings;.

2.  %passwords = { is most certainly wrong, use parens for hash (lists), curlies are for hash {references}

3. you're mixing doublequotes in the variable interpolation:

print("$passwords{"Matt"} is my password.");
, no need for them when adressing hash-keys:
print("$passwords{Matt} is my password.")

Cheers Rolf