in reply to Wondering novice...

If you're going to have be adding a lot of addresses to your data file, be aware that a linear search will not scale well. Your script will become slower and slower the more people you add. One option (as before) is a tied hash. See perldoc:perltie for details there. Another, if you wish to maintain your .dat file is to use DBD::CSV from CPAN. It's a module that lets you use the standard DBI interface on Comma Separated Value files. (You can specify a different separator, though.)

Just additional information to help you move beyond novice status.... (The print("--$variable--") idea is very useful. That will probably help more than my suggestion.)