thank you this is great solution.
can you replicate the counter and method to getting most duplicated using this function method
sub mode_num{
my %count=();
%opt = %{shift @_ } ; #creating hash
#dump \%opt; #check data coming in..
#need to get integrate count as I format data into hash(next task
+ to make it reable)
for (sort{$a <=> $b} %opt{NUMBERS}){
#dump \$opt{NUMBERS}++;
$opt{NUMBERS}++;
}
our @keys= sort{$opt{NUMBERS}->{$b}<=>$opt{NUMBERS}->{$a}} key
+s %opt{NUMBERS};
return
}
now, I would like to use this method above so I can see how the loop/counter/finding most duplicated with a hash_ref works ($opt->{NUMBERS}[])
It intrigued me to follow this method. Unfortunately, I haven't gotten a solution yet |