in reply to Adding values from an array to a hash

Do you mean this:

$locations{$_}++ for @locations;
--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg