my @pairs = (); while ( my ($key,$value) = each %hash) { push @pairs, $key . ' => ' . $value; } print join(', ', @pairs);