Perlの場合

foreach my $key( keys %hash ){
    print 'key: ', $key, "\n";
    print 'value:', $hash{ $key }, "\n";
}

PHPの場合

foreach( $hash as $key => $value ){
    echo 'key: '. $key. "\n";
    echo 'value:'. $value. "\n";
}