In Perl:
my %members = ( "fools" => 6,
"monsters" => 2,
"weirdos" => 1,
"coders" => 1,
"betrayers" => 1, );
When I write:
my @values_members = values %members;
The position of the elements in the array will not be 6, 2, 1, 1, 1 (the position "as they appear" in the code). It will be random or close to random.
I want a function such that:
my values_members = get_values_with_position_as_appears_in_code ( %members );
gives
( 6, 2, 1, 1, 1 );
Is this possible?