my %new_stuff = ( "RATING" => 4.99 ); db_modify_account( "jdonald", \%new_stuff ); sub db_modify_account { my( $uid, $ref_new_data ) = @_; while ( ( $key, $value ) = each %{ $ref_new_data } ) { print "The $key is: $value.
"; } print "Oh, and the user is $uid.
"; }