while ( my ( $k, $v ) = each( %{ create_new_hash() } ) ) { ... }