in reply to adding to a hash

The .= operator only applies to strings.
To add to a hash, try this:
$variables{variable_name} = get_page_content("names");

Please please get yourself a copy of Learning Perl, it'll pay off :)