in reply to Re^3: unxpected sort warnings while using sort
in thread unxpected sort warnings while using sort

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

Replies are listed 'Best First'.
Re^5: unxpected sort warnings while using sort
by perlynewby (Scribe) on Jul 31, 2015 at 23:17 UTC

    i need help figuring out how to work this sub. thanks