in reply to passing hashes to a function

As chromatic said, w/ a bit of further explanation: the first print statement in your loop
print $value = $hash{$key};
is setting $value equal to $hash{$key}, which is probably what you want; and is then printing the value of that statement. And the value is $value.

So, when $value is "green", for example, that's why you're seeing "greenfruit". "green" and "fruit" are actually coming from different print statements.

Does that make sense? Is that the problem you were having?

To fix that, of course, just take out print, leaving the

$value = $hash{$key};
Or, of course, you could just get rid of that line altogether and put $hash{$key} into the real print statement:
print "fruit: $key is $hash{$key}\n\n";
Your choice.