in reply to Hash issues

If $value1 is equal to $key I want to print "$key1:$value1:$value\n" Why doesn't this work?

if you want to test what you said above you would say

if ( $value1 eq $key ){ ...; }