First sort the keys by the associated value. Then get the values (e.g. by using a hash slice).
my @keys = sort { $h{$a} <=> $h{$b} } keys(%h);
my @vals = @h{@keys};
Or if you have a hash reference.
my @keys = sort { $h->{$a} <=> $h->{$b} } keys(%$h);
my @vals = @{$h}{@keys};