in reply to Passing a hash between subs
If Data::Dumper shows the values coming back into %locations correctly, then I guess the problem is the key you look up ($ref->{location}). Have you checked that the key you're looking for is really in the hash? Are you perhaps being caught by invisible characters?
--<http://www.dave.org.uk>
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In Section
Seekers of Perl Wisdom