in reply to Passing hash references

One issue you have is that you're adding a level of indirection by passing a reference to $names to validateNames, but it's already a reference (to the %data hash). So just call &validateNames($names).

As for printing the data, you can do this:

for my $key (keys %$valid_names) { print "key: $key\n"; print " name: $valid_names->{$key}{name}\n"; print " email: $valid_names->{$key}{email}\n"; }

Finally, the places to look for more information on data structures and references are: perldata, perldsc, and perlref.

-b