$h{$key1,$key2} = $val; while (my ($key, $val) = each %h) { my ($key1, $key2) = split /$;/, $key; print "$key1;$key2 -> $val\n"; }