in reply to adding to a hash

Not unless get_page_content("names") returns a key-value paired list.
Well, duh, but that's implied by his question.
Plus, that's just a silly way of doing it.
I don't think it's silly, just inefficient. How about this:
sub pushhash (\%@) { my $hash = shift; my $key; $$hash{$key} = shift while defined($key = shift); } my %a; $a{cow} = "COW1"; $a{dog} = "DOG1"; pushhash %a, cow => "COW2", bull => "Terrier"; for (sort keys %a) { print "$_ => $a{$_}\n"; }